Kubernetes ConfigMap Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 27: Line 27:


Multiple <code>--from-literal=</code> entries are allowed.
Multiple <code>--from-literal=</code> entries are allowed.
==Use the Content of a File==

Revision as of 21:56, 22 October 2019

External

Internal

Inspect 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

Multiple --from-literal= entries are allowed.

Use the Content of a File