Interview Prep/Kubernetes/Configuration, Secrets and storage

A ConfigMap was updated but the pod still shows old values. Why?

IntermediateScenarioConfiguration, Secrets and storage
Answer

Situation read → The change was applied but the app behaves as before.

What I'd do →

  1. Check how it is consumed: env vars are fixed at container start
  2. For mounted files wait for the kubelet sync (up to about a minute) and check with kubectl exec -- cat /etc/app/config
  3. Check whether subPath is used, which never updates
  4. Check the app reloads files, since many only read at startup
  5. Trigger kubectl rollout restart or use a config checksum annotation

Why → Kubernetes updates the projected files, but it cannot make a process re-read them.

Interview tip → Say Reloader or a checksum annotation makes it automatic.

All Kubernetes questions Roadmap: Kubernetes core

More on Configuration, Secrets and storage