This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.22.2.3. 从 Literal 值创建
您还可以为 ConfigMap
提供字面值。--from-literal
选项使用 key=value
语法,允许直接在命令行中提供字面值:
创建指定字面值的
ConfigMap
:oc create configmap special-config \ --from-literal=special.how=very \ --from-literal=special.type=charm
$ oc create configmap special-config \ --from-literal=special.how=very \ --from-literal=special.type=charm
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 验证结果:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow