CertGrid CertGrid
Hands-on Lab·Kubernetes and Cloud Native Associate

ConfigMap Consumption Methods

A ConfigMap is one object, but a Pod can consume it three ways at once - as an environment variable, as a mounted directory, and as a single file placed with subPath. Change the ConfigMap and the three stop agreeing. One updates after a delay you can measure, one never updates at all, and one is only fixed by replacing the Pod. This is the reason a config change appears to work in testing and does nothing in production.

Kubernetes Fundamentals Guide 7 of 46 Beginner

Written against the versions above. The propagation delay here is the kubelet's own sync period, not a fixed constant: it is configurable through `syncFrequency` and the `configMapAndSecretChangeDetectionStrategy` in the kubelet config. The 95 seconds measured below is what a default kubeadm cluster produced on the day, not a number to quote back.

The Pod runs on whichever worker the scheduler picks - the propagation delay is the kubelet's on that node, so all four machines are listed.
Server NameIP AddressOSRolesCPURAMHDD
CKA1001192.168.0.175Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA1001-NODE01192.168.0.176Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE02192.168.0.177Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB
CKA1001-NODE03192.168.0.178Ubuntu 26.04 LTSWorker Node2 Core4 GB50 GB

Before you start

  1. One ConfigMap, consumed three ways

  2. They agree, which is what hides the problem

  3. Change it once, and nothing happens

  4. Ninety-five seconds later, one of them moves

  5. The only thing that moves an environment variable

Official sources