Interview Prep/Kubernetes/Deployments and rollouts

You applied a new image tag and the rollout seems stuck at "1 out of 3 new replicas have been updated". What do you check first?

BeginnerScenarioDeployments and rollouts
Answer

Situation read → The Deployment controller created one new pod and is waiting for it to become Ready before it continues. The problem is almost always that new pod.

What I'd do →

  1. kubectl rollout status deploy/web to confirm it is really stuck
  2. kubectl get pods -l app=web and find the pod with the newest age
  3. kubectl describe pod <new-pod> and read Events at the bottom (ImagePullBackOff, Unschedulable, failed probe)
  4. kubectl logs <new-pod> --previous if it is restarting
  5. Fix the cause, or roll back with kubectl rollout undo deploy/web

Why → The rolling update honours maxUnavailable and maxSurge, so a broken new pod blocks the rollout while the old pods keep serving. Nothing is down, which buys you time to debug.

Interview tip → Say that the old ReplicaSet is still serving traffic, so a stuck rollout is not an outage.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts