Interview Prep/Kubernetes/Configuration & Storage

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
All Kubernetes questions Roadmap: Kubernetes core

More on Configuration & Storage