DevOps Engineer interview question · Most asked

How do Kubernetes rolling updates work, and how do maxSurge and maxUnavailable affect them?

Create a free account to save this page, take notes and track your progress. Sign in

Summary

The Deployment controller creates a new ReplicaSet and shifts pods from old to new in steps. maxSurge is how many pods above the desired count may exist, and maxUnavailable how many may be missing; both default to 25%. Readiness probes gate each step, and kubectl rollout undo returns to the previous ReplicaSet.

Longer Answer

maxUnavailable 0 with a surge keeps full capacity but needs spare cluster resources; a higher maxUnavailable rolls faster with less headroom. PodDisruptionBudgets protect availability during node maintenance, not rollouts.

Key Points

  • New ReplicaSet, stepwise replacement.
  • maxSurge vs maxUnavailable trade-offs.
  • Readiness gates progress.
  • rollout undo for rollback.

Deep dive: DevOps Tutorial: Rolling Updates, Probes and Resources

Explanation

What interviewers look for

Mechanics plus trade-offs for capacity and speed.

More most-asked DevOps Engineer questions

← All DevOps Engineer questions

Was this page helpful?