Bird
0
0

You want to update your deployment with zero downtime and ensure at least 2 pods are always available during the update. Which rolling update settings in the deployment spec help achieve this?

hard📝 Best Practice Q15 of 15
Kubernetes - ReplicaSets and Deployments
You want to update your deployment with zero downtime and ensure at least 2 pods are always available during the update. Which rolling update settings in the deployment spec help achieve this?
ASet 'maxUnavailable' to 1 and 'maxSurge' to 1 in 'rollingUpdate' strategy
BSet 'maxUnavailable' to 2 and 'maxSurge' to 0 in 'rollingUpdate' strategy
CSet 'maxUnavailable' to 3 and 'maxSurge' to 3 in 'rollingUpdate' strategy
DSet 'maxUnavailable' to 0 and 'maxSurge' to 2 in 'rollingUpdate' strategy
Step-by-Step Solution
Solution:
  1. Step 1: Understand maxUnavailable and maxSurge

    'maxUnavailable' controls how many pods can be down; 'maxSurge' controls extra pods created during update.
  2. Step 2: Ensure at least 2 pods always available

    Setting 'maxUnavailable' to 0 means no pods go down; 'maxSurge' 2 allows 2 extra pods to be created for smooth update.
  3. Final Answer:

    Set 'maxUnavailable' to 0 and 'maxSurge' to 2 in 'rollingUpdate' strategy -> Option D
  4. Quick Check:

    Zero unavailable + surge 2 = no downtime, 2 pods always up [OK]
Quick Trick: maxUnavailable 0 means no pod down; maxSurge adds extra pods [OK]
Common Mistakes:
  • Setting maxUnavailable > 0 causes downtime
  • Setting maxSurge to 0 prevents extra pods during update
  • Choosing high maxUnavailable and maxSurge causing instability

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes