What is a ConfigMap and how can a Pod consume it?
BeginnerConceptConfiguration & Storage
Answer
A ConfigMap stores non-confidential key/value config. Pods consume it as environment variables (env.valueFrom.configMapKeyRef or envFrom), as files via a volume mount, or via the API. Volume-mounted ConfigMaps update eventually; environment variables never refresh until the Pod restarts.
kubectl create configmap app-config --from-literal=LOG_LEVEL=info --from-file=app.properties
More on Configuration & Storage
What is a Secret and is it secure by default?BeginnerWhat are the common Secret types?BeginnerWhat is a Volume and how does it differ from a container filesystem?BeginnerWhat is `emptyDir` and when is it used?BeginnerWhat are PersistentVolume (PV), PersistentVolumeClaim (PVC) and StorageClass?BeginnerWhat are the PV access modes?Beginner