Configuration propagation
An object update is not an application reload
Suppose the bookstore changes its theme from light to dark. Updating the ConfigMap changes data stored through the Kubernetes API. That does not automatically replace existing Pods or tell a running application to change behavior. There are several stages: API object update, kubelet delivery where applicable, application read, and observable response. Diagnose them separately. A configuration update without any Pod template change does not itself trigger a Deployment rollout.
Compare environment and mounted files
Environment variables are supplied when a container starts. An already-running process does not receive a new environment just because its referenced ConfigMap or Secret changed. A regular ConfigMap or Secret volume can receive updated content eventually; the delay depends on kubelet synchronization and its configured detection/cache behavior. There is no universal instant-refresh guarantee. A mount using subPath does not receive those automatic updates. A program reading a file once and caching its value will still behave as before until it reloads or restarts.
Synthetic observation after volume projection:Existing environment variable: lightReopened ordinary mounted file: darkApplication that cached old content: lightExisting subPath mount: lightThese four observations are compatible: each follows a different delivery or reading mechanism. Reopening the projected path after the update matters; a process holding an older file descriptor may still see old contents.
Use immutable versioned configuration
Set immutable: true when data should remain fixed for that object. Once immutable, the data cannot be changed and immutability cannot be reversed. Metadata may still be changed. Rather than deleting an immutable object that active Pods need, create a new named object, update the workload Pod template reference and review a rollout. Keep the previous object until rollback requirements and all consumers have been checked. The same principle can apply to immutable Secrets, but credentials also need a coordinated rotation plan.
apiVersion: v1kind: ConfigMapmetadata: name: book-settings-v2 namespace: book-labimmutable: truedata: THEME: "dark" MAX_RESULTS: "20" settings.properties: | theme=dark pageSize=20This object is named book-settings-v2 and contains the dark theme. It does not modify book-settings. A Deployment must reference the new name in all applicable env and volume fields to deliver the new configuration to replacement Pods.
Roll out deliberately and verify behavior
For startup-only configuration, a controlled Pod replacement is a straightforward delivery strategy. For a Deployment, update its declarative source and use the rollout workflow taught earlier. For applications designed to reload configuration files, wait for the projected file and use the application’s documented reload mechanism. There is no generic Kubernetes reload signal for all applications. A restart may temporarily reduce available capacity; plan for readiness and rollback. For secrets, verify dependent systems accept the new value and revoke the old one after an approved transition. Avoid printing secret contents during verification.
Review new object -> change Pod template -> review rollout -> verify non-sensitive app behavior -> retain old object until safe cleanupThis is a planning sequence, not a command or a promise of availability. A rollback to a previous Pod template only works if its referenced configuration remains available; mutable objects with reused names may already contain new data.
Practice: predict and explain the update
Read propagation-cases.json as a hypothetical in-place update of the mutable book-settings object. Predict what the four consumers see after the new data is projected. Separately inspect book-settings-v2.yaml as an alternative versioned rollout, not the source of the in-place update. For each, identify whether the learner needs to wait, reopen a file, reload the application or replace a Pod. Explain why an immutable versioned object makes a rollback easier to reason about. This completes the chapter; the next chapter covers probes, resource requests and graceful termination so that rollout outcomes can be measured.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Configuration propagation — knowledge check
Apply the lesson concepts to original offline scenarios.
A ConfigMap changes from light to dark. What does an existing process environment variable contain?
What happens to an ordinary ConfigMap volume after an update?
Which mount does not receive automatic ConfigMap volume updates?
Which approach delivers an updated immutable ConfigMap to a Deployment?
A projected file contains dark but the application still shows light. What is a plausible explanation?