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
- Kubernetes Secret — A Kubernetes object for small sensitive values such as passwords and tokens, which pods can use as files or environment variables.
- environment variable — A named setting such as PORT=8000 that a program reads from its surroundings when it starts.
- config checksum annotation — A hash of a ConfigMap or Secret placed in a pod template annotation, so that changing the configuration changes the template and triggers a rollout.
- secret — Any value that grants access, such as a password, access token or private key, and must be kept out of code and version control.
- Kubernetes — An open-source system that runs and manages containers across a cluster of machines.
Taught in
- Template Types: Nine Ways To Do A Step — Certified Argo Project Associate (CAPA) Exam Prep
- Artifacts: Files That Outlive The Pod — Certified Argo Project Associate (CAPA) Exam Prep
- Sync: Manual Or Automated, Prune And Self-Heal — Certified Argo Project Associate (CAPA) Exam Prep
- Sync Phases, Waves And Hooks — Certified Argo Project Associate (CAPA) Exam Prep
- Health, Reconciliation And Fields Argo CD Should Ignore — Certified Argo Project Associate (CAPA) Exam Prep
- Final Mock, Review And A Trap Sprint — Certified Argo Project Associate (CAPA) Exam Prep
- Three Edits At 2 A.M.: Drift And Reconciliation — Certified GitOps Associate (CGOA) Exam Prep
- An Hour Without Payments: Continuously Reconciled — Certified GitOps Associate (CGOA) Exam Prep
- Two Clicks Nobody Wrote Down: Configuration And Infrastructure As Code — Certified GitOps Associate (CGOA) Exam Prep
- Thursday, With A Way Back: Promotion, Deploy And Release — Certified GitOps Associate (CGOA) Exam Prep
- Generators Write The YAML, You Decide — Certified Kubernetes Administrator (CKA) Exam Prep
- Contexts, Namespaces And One-Line Answers — Certified Kubernetes Administrator (CKA) Exam Prep
- What A Container Said Before It Died — Certified Kubernetes Administrator (CKA) Exam Prep
- Four Faults, Twelve Minutes — Certified Kubernetes Administrator (CKA) Exam Prep
- CoreDNS: The Corefile Every Name Depends On — Certified Kubernetes Administrator (CKA) Exam Prep
- Volumes By Hand: Access Modes, Binding And Reclaim — Certified Kubernetes Administrator (CKA) Exam Prep
- Helm: Install, Upgrade And Roll Back — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Kustomize Bases, Overlays And Patches — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Monitoring With The Built-in CLI — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Container Logs — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Observability: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ConfigMaps And Secrets — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ServiceAccounts And Tokens — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Custom Resources And Operators — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Configuration And Security: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Final Review: Where Your Marks Are At Risk — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Ingress TLS: When The Padlock Lies — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Seccomp: Which Syscalls A Container May Make — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Encryption At Rest: What etcd Really Holds — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Secrets In Use: Leaks Through Env, Specs And Images — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Encrypting Pod-to-Pod Traffic: mTLS With Istio And Cilium — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Audit Policy: Choosing What The Cluster Remembers — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Falco: Detecting What Happens Inside Containers — Certified Kubernetes Security Specialist (CKS) Exam Prep
- From Local Containers To Kubernetes — Docker Architecture & Production Containers
- Sixty Questions, Ninety Minutes — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Same Name, Wrong Namespace: Objects, Namespaces And Labels — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- The Status Tells You Where To Look: Troubleshooting Pods — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Bookings That Survive The Pod: Volumes And Claims — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Orchestration Sprint: Four Fixes, No Walls Removed — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- The Image Nobody Tested: Cloud Native Principles — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Slow, Or Broken? Metrics, Logs And Traces — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Architecture Sprint: The Refunds Review — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- The Festival, End To End: Final Review — Kubernetes and Cloud Native Associate (KCNA) Exam Prep
- Eleven Months Of Yes: The API Server — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Copied From A Blog Post: The Kubelet — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- A Pod That Mounts The Node: Runtime, Pods And Storage — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Port 30080 On Every Node: kube-proxy, Networking And Clients — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Component Sprint: The Reference Build — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Read-Only, Except Secrets: RBAC In Depth — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Encoded Is Not Hidden: Secrets — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Who Read The Gateway Key? Audit Logging — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- What Outlives The Fix: Persistence And Privilege Escalation — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Threat Model Sprint: Name It, Then Stop It — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Forty Minutes Of Yes: Admission Control — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Platform Sprint: Evidence, Order, Proof — Kubernetes and Cloud Native Security Associate (KCSA) Exam Prep
- Worker Nodes: kubelet, Runtime, CNI And kube-proxy — Kubernetes: Production-Grade Container Orchestration
- ConfigMaps, Secrets And Configuration Updates — Kubernetes: Production-Grade Container Orchestration
- kubeadm, High Availability And Cluster Lifecycle — Kubernetes: Production-Grade Container Orchestration
- A New Depot By Friday: OpenTofu, Cloud-init, Pipelines And Kubernetes — CompTIA Linux+ (XK0-006) Exam Prep
References
Certification courses
- CAPA course and practice exam: Certified Argo Project Associate
- CGOA course and practice exam: Certified GitOps Associate
- CKA course and practice exam: Certified Kubernetes Administrator
- CKAD course and practice exam: Certified Kubernetes Application Developer
- CKS course and practice exam: Certified Kubernetes Security Specialist
- KCNA course and practice exam: Kubernetes and Cloud Native Associate
- KCSA course and practice exam: Kubernetes and Cloud Native Security Associate
- CompTIA Linux+ course and practice exam: XK0-006