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 →
kubectl get rs -o wideand compare DESIRED, CURRENT, READY per ReplicaSetkubectl describe deployto read events and the scaling messages- Check that the new pods fail readiness and that HPA is not fighting the controller during surge
- Check ResourceQuota for pod count or CPU that blocks the new pods
- 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.
More on 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?BeginnerHow do you roll back a bad release and verify you are back on the previous version?BeginnerA rollout must never reduce capacity below current replicas. How do you configure the strategy?IntermediateYou need a blue/green deployment without a service mesh. How do you do it with plain Kubernetes?IntermediateHow would you do a canary release with only Deployments and a Service?IntermediateWhat is the difference between Recreate and RollingUpdate strategies and when would you pick Recreate?Beginner