Pcornel
Automation · Kubernetes Automation

ConfigMaps

Cheat sheet · https://pcornel.dk/topic.php?topic=5797

Back to the Topic

Answer

ConfigMaps hold non-secret configuration for Kubernetes pods as key-value pairs or files, mounted as volumes or exposed as environment variables, and versioned with the application manifests.

Remember

  • Mount as files or env vars.
  • Updates to env vars need pod restart.
  • Version with manifests.

First checks

  • kubectl get configmap <n> -o yaml — content
  • Config hash annotation to roll pods — reload
  • kustomize build . | grep -A3 ConfigMap — generated

Verify in this order

ConfigMap → mounted/env → pods (rollout on change)

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Kubernetes Automation → ConfigMaps · operational reference

LayerKubernetes Automation → ConfigMaps operational reference
Runtime/ownershipKubernetes ConfigMap automation · the Kubernetes API server storing ConfigMap objects and workload controllers/kubelet projecting their data into Pods
Persistent intentversioned ConfigMap manifest with namespace/name, data or binaryData keys, ownership labels and consumer references
Verificationkubectl get the exact ConfigMap and consuming workload, apply a bounded test key change, inspect resourceVersion and the Pod-consumed value, then verify whether rollout/reload semantics match the usage mode.
Expected interpretationThe intended namespace/object is updated, consumers reference the correct key, confidential values remain elsewhere, and the application observes the expected configuration through the documented projection/reload path.
Recovery boundarypreserve object UID/resourceVersion and workload generation, repair the specific key/reference, rollout/restart only when consumption semantics require it, then verify inside the consumer and via service behavior

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5797

Confirmation

Confirm action

Continue?