How do you ensure a rolling update does not violate availability during node drains at the same time?
IntermediateScenarioDeployments and rollouts
Answer
Situation read → The platform team is upgrading nodes while an app team deploys, and the service dipped.
What I'd do →
- Create a PodDisruptionBudget, for example
minAvailable: 80%ormaxUnavailable: 1 - Run at least 3 replicas spread over zones with
topologySpreadConstraints - Remember PDBs apply to evictions (drain), not to rolling-update deletions
- Coordinate by using
maxUnavailable: 0on the Deployment - Check with
kubectl get pdbthatALLOWED DISRUPTIONSis above 0
Why → A PDB limits voluntary evictions from drains, while the Deployment strategy limits its own rollout. You need both to be safe in parallel.
Interview tip → Many candidates think PDB protects against rolling updates; it does not.
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