FahamLah

Commands

kubectl create configmap

kubectl create configmap <name> --from-literal=KEY=value [--from-file=<file>]

Risk: Safe

What it does

Pins a note of settings on the wall: a ConfigMap.

When to use it

Settings that change more often than the image.

Example

$ kubectl create configmap settings --from-literal=GREETING=Hai

A note that says GREETING is Hai.

$ kubectl create configmap settings --from-literal=GREETING=Hai --dry-run=client -o yaml

Print the YAML, create nothing.