ConfigMap

The Kubernetes object that holds non-secret settings as key and value pairs, for pods to read as environment variables or files.

In more detail

It keeps configuration out of the image, so the same image can run with different settings. Values copied into environment variables only change when the pod restarts, while mounted files refresh after a kubelet sync. Changing a ConfigMap never restarts a process by itself.

Example

kubectl get cm web-config -o jsonpath='{.data.LOG_LEVEL}'

Related terms

Taught in

References

Certification courses