Bird
0
0

You want to update the container image of a StatefulSet without downtime, ensuring pods restart one by one in order. Which update strategy should you use?

hard📝 Best Practice Q15 of 15
Kubernetes - Persistent Storage
You want to update the container image of a StatefulSet without downtime, ensuring pods restart one by one in order. Which update strategy should you use?
ARollingUpdate with partition set to the last pod index
BRollingUpdate with partition set to 0
COnDelete update strategy
DRecreate update strategy
Step-by-Step Solution
Solution:
  1. Step 1: Understand StatefulSet update strategies

    RollingUpdate updates pods in order, respecting pod ordinal index; partition controls which pods update.
  2. Step 2: Use partition to control update order

    Setting partition to 0 (default) updates all pods sequentially from the highest ordinal index down to 0, one by one without downtime.
  3. Final Answer:

    RollingUpdate with partition set to 0 -> Option B
  4. Quick Check:

    Partition controls pod update order in RollingUpdate [OK]
Quick Trick: Use RollingUpdate with partition to update pods one by one [OK]
Common Mistakes:
  • Using OnDelete causes manual pod restarts, not automatic
  • Recreate deletes all pods causing downtime
  • RollingUpdate with partition set to the last pod index only updates higher ordinal pods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes