You want immutable ConfigMaps and Secrets. Why and how?
IntermediateScenarioConfiguration, Secrets and storage
Answer
Situation read → Accidental config edits keep causing incidents and kubelet watch load is high.
What I'd do →
- Set
immutable: trueon the ConfigMap or Secret - Version names like
app-config-v7and update the Deployment reference - Roll out and roll back through Deployment revisions
- Helm and Kustomize
configMapGeneratoradd hashes automatically - Delete old versions later
Why → Immutability prevents accidental change and reduces API server watches.
Interview tip → Mention Kustomize hash suffix as the easy route.
More on Configuration, Secrets and storage
How do you inject configuration into pods and what are the options?BeginnerA ConfigMap was updated but the pod still shows old values. Why?IntermediateHow do you store a database password safely in Kubernetes?BeginnerHow do you manage secrets in GitOps without committing them in plain text?IntermediateA pod fails with `CreateContainerConfigError` and a missing key. What happened?BeginnerWhat is the difference between emptyDir, hostPath, PV/PVC and when do you use each?Beginner