Bird
0
0

Given a Deployment with strategy.type: Recreate and 3 replicas, what happens when you update the container image?

medium📝 Predict Output Q4 of 15
Kubernetes - ReplicaSets and Deployments
Given a Deployment with strategy.type: Recreate and 3 replicas, what happens when you update the container image?
ANew pods start first, then old pods are deleted.
BAll old pods are terminated first, then new pods start with the new image.
COne pod updates at a time with zero downtime.
DPods are updated randomly without order.
Step-by-Step Solution
Solution:
  1. Step 1: Understand Recreate update behavior

    Recreate deletes all old pods before creating new ones, causing downtime.
  2. Step 2: Apply to container image update

    When image changes, old pods are removed first, then new pods with updated image start.
  3. Final Answer:

    All old pods are terminated first, then new pods start with the new image. -> Option B
  4. Quick Check:

    Recreate update = delete old pods first [OK]
Quick Trick: Recreate causes downtime by deleting old pods first [OK]
Common Mistakes:
  • Assuming zero downtime update
  • Thinking new pods start before old pods deleted
  • Believing pods update randomly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes