Bird
0
0

Why does this PDB fail validation?

medium📝 Debug Q7 of 15
Kubernetes - Production Best Practices
Why does this PDB fail validation?
spec:
  maxUnavailable: 110%
  selector:
    matchLabels:
      app: api
AmaxUnavailable cannot exceed 100%
Bselector must use matchExpressions instead of matchLabels
CmaxUnavailable must be an integer only
DPDB requires minAvailable instead of maxUnavailable
Step-by-Step Solution
Solution:
  1. Step 1: Check maxUnavailable value

    maxUnavailable can be an integer or percentage but cannot exceed 100%.
  2. Step 2: Identify invalid percentage

    110% is invalid and causes validation failure.
  3. Final Answer:

    maxUnavailable cannot exceed 100% -> Option A
  4. Quick Check:

    maxUnavailable max 100% = C [OK]
Quick Trick: maxUnavailable percentage max is 100% [OK]
Common Mistakes:
  • Using percentages over 100%
  • Confusing matchLabels with matchExpressions
  • Thinking maxUnavailable must be integer only

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes