ConfigMaps and Secrets in Kubernetes

From the Kubernetes Essentials cheat sheet ยท Configuration ยท verified Aug 2026

ConfigMaps and Secrets

Create configuration and expose it to Pods.

bash
kubectl create configmap app-config --from-literal=LOG_LEVEL=info
kubectl create secret generic db --from-literal=password='change-me'
๐Ÿ“Œ Base64 encoding is not encryption
โš ๏ธ Avoid secrets in shell history and Git
๐Ÿ’ก Mount config as files for live updates
๐Ÿ” Environment variables need a Pod restart to refresh
configmapsecretconfiguration

Continue with Kubernetes Essentials

Save the full cheat sheet or work through every related task.

Back to the full Kubernetes Essentials cheat sheet