Bird
0
0

After setting strategy.type: Recreate in your Deployment, you observe that new pods start before old pods terminate. What could cause this behavior?

medium📝 Troubleshoot Q6 of 15
Kubernetes - ReplicaSets and Deployments
After setting strategy.type: Recreate in your Deployment, you observe that new pods start before old pods terminate. What could cause this behavior?
AThe Deployment has <code>maxUnavailable</code> set to a non-zero value
BThe Deployment controller is overridden by a custom controller ignoring the strategy
CThe pods have no readiness probes configured
DThe Deployment is using RollingUpdate strategy instead
Step-by-Step Solution
Solution:
  1. Step 1: Verify Strategy Enforcement

    Recreate strategy should delete old pods before creating new ones.
  2. Step 2: Identify External Interference

    If a custom controller or operator manages the Deployment, it might ignore the strategy setting.
  3. Step 3: Exclude Other Causes

    maxUnavailable is not used with Recreate; readiness probes affect pod readiness but not deletion order; using RollingUpdate would not match the given setting.
  4. Final Answer:

    The Deployment controller is overridden by a custom controller ignoring the strategy -> Option B
  5. Quick Check:

    Custom controllers can override update behavior [OK]
Quick Trick: Custom controllers may ignore Recreate strategy [OK]
Common Mistakes:
  • Assuming maxUnavailable applies to Recreate
  • Blaming readiness probes for pod deletion order
  • Not checking for custom controllers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes