Kubernetes ConfigMap Operations: Difference between revisions
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
* [[Kubernetes Operations#ConfigMap_Operations|Kubernetes Operations]] | * [[Kubernetes Operations#ConfigMap_Operations|Kubernetes Operations]] | ||
* [[Kubernetes_Cluster_Configuration_Concepts#ConfigMap|Kubernetes Cluster Configuration Concepts]] | * [[Kubernetes_Cluster_Configuration_Concepts#ConfigMap|Kubernetes Cluster Configuration Concepts]] | ||
=Inspecting a ConfigMap= | |||
kubectl get cm <''name''> -o yaml | |||
<syntaxhighlight lang=yaml> | |||
apiVersion: v1 | |||
kind: ConfigMap | |||
metadata: | |||
name: example | |||
... | |||
data: | |||
color: red | |||
shape: square | |||
</syntaxhighlight> | |||
=Create a ConfigMap with CLI= | =Create a ConfigMap with CLI= |
Revision as of 21:54, 22 October 2019
External
Internal
Inspecting a ConfigMap
kubectl get cm <name> -o yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: example
...
data:
color: red
shape: square
Create a ConfigMap with CLI
Specify Key/Value Pairs on Command Line
kubectl create configmap example --from-literal=color=red --from-literal=shape=square