Interview Prep/Kubernetes/Deployments and rollouts

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 →

  1. Create a PodDisruptionBudget, for example minAvailable: 80% or maxUnavailable: 1
  2. Run at least 3 replicas spread over zones with topologySpreadConstraints
  3. Remember PDBs apply to evictions (drain), not to rolling-update deletions
  4. Coordinate by using maxUnavailable: 0 on the Deployment
  5. Check with kubectl get pdb that ALLOWED DISRUPTIONS is 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.

All Kubernetes questions Roadmap: Kubernetes core

More on Deployments and rollouts