Interview Prep/Kubernetes/Pod startup failures

You pushed a fix to `web:latest`, restarted the Deployment, and the old buggy code is still running.

BeginnerTroubleshootingPod startup failures
Answer

Likely causes → The Pod spec did not change, so nodes reuse the cached image. With a :latest tag the default pull policy is Always, but if someone set imagePullPolicy: IfNotPresent the node never re-pulls. Different nodes may even run different "latest" builds.

Diagnose →

kubectl get pods -l app=web -o jsonpath='{range .items[*]}{.spec.nodeName}{"\t"}{.status.containerStatuses[0].imageID}{"\n"}{end}'

Different imageID digests across Pods confirm the problem.

Fix → Deploy an immutable tag or digest (web@sha256:...) and update the manifest; that triggers a real rollout.

Prevent → Ban :latest with an admission policy; CI writes the digest into the GitOps repo.

All Kubernetes questions Roadmap: Kubernetes core

More on Pod startup failures