'I edited the ConfigMap and the app still has the old value — why?' The Deployment consumes it through envFrom, and the engineer changed it with kubectl edit. When do the running pods see the new values?
- Within about a minute, when the kubelet syncs. That is the behaviour of volume mounts, not env vars.
- Immediately; the API server pushes the change. Nothing pushes into a process's environment.
- Never, until the pods are recreated: environment variables are read once at container start. Env vars are a snapshot taken when the container is created.
- On the next liveness probe. Probes check health; they do not reload configuration.
Never; environment variables are read once at container start, so the pods must be recreated.
The transport determines the update semantics. Env vars: at start only. Volumes: eventually, in place. subPath volumes: never. That is the whole topic in three sentences, and interviewers ask it because so many incidents come from expecting env vars to change.
Answering 'within a minute when the kubelet syncs'. That is the volume behaviour; nothing ever rewrites a running process's environment.