Interview Prep/Kubernetes/Deployments and rollouts

A rolling update leaves the Deployment with two ReplicaSets both having pods, and it never converges. Why?

AdvancedScenarioDeployments and rollouts
Answer

Situation read → Old pods keep getting recreated while new pods fail readiness, and an HPA is also scaling.

What I'd do →

  1. kubectl get rs -o wide and compare DESIRED, CURRENT, READY per ReplicaSet
  2. kubectl describe deploy to read events and the scaling messages
  3. Check that the new pods fail readiness and that HPA is not fighting the controller during surge
  4. Check ResourceQuota for pod count or CPU that blocks the new pods
  5. Resolve the readiness or quota issue, or roll back

Why → The Deployment controller will not scale the old RS down below what keeps availability, so a new RS that never becomes Ready freezes the rollout in a mixed state.

Interview tip → Mention kubectl get events --sort-by=.lastTimestamp as your first move.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts