Bird
0
0

You have an app that cannot run multiple versions simultaneously. How do you configure the Deployment update strategy to avoid version conflicts?

hard📝 Workflow Q15 of 15
Kubernetes - ReplicaSets and Deployments
You have an app that cannot run multiple versions simultaneously. How do you configure the Deployment update strategy to avoid version conflicts?
ASet <code>strategy.type: Recreate</code> to delete old pods before new ones
BSet <code>strategy.type: RollingUpdate</code> with maxSurge=1
CUse <code>kubectl rollout restart</code> without changing strategy
DSet <code>strategy.type: BlueGreen</code> for zero downtime
Step-by-Step Solution
Solution:
  1. Step 1: Identify app requirement

    The app cannot run multiple versions at the same time, so pods must not overlap.
  2. Step 2: Choose update strategy

    Recreate deletes old pods before creating new ones, ensuring no version overlap.
  3. Step 3: Rule out other options

    RollingUpdate allows overlapping versions, kubectl restart doesn't change strategy, BlueGreen is not a built-in Kubernetes strategy.
  4. Final Answer:

    Set strategy.type: Recreate to delete old pods before new ones -> Option A
  5. Quick Check:

    App needs no overlap = use Recreate [OK]
Quick Trick: Use Recreate strategy to avoid running multiple versions [OK]
Common Mistakes:
  • Choosing RollingUpdate which allows overlap
  • Thinking kubectl restart changes update strategy
  • Assuming BlueGreen is a native Kubernetes strategy

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes