Bird
0
0

You want to ensure that only pods with a specific toleration can run on a node, and all other pods are evicted if already running. Which taint effect should you use?

hard📝 Best Practice Q15 of 15
Kubernetes - Scheduling
You want to ensure that only pods with a specific toleration can run on a node, and all other pods are evicted if already running. Which taint effect should you use?
ANoSchedule
BPreferNoSchedule
CNoExecute
DNoEvict
Step-by-Step Solution
Solution:
  1. Step 1: Understand taint effects

    NoSchedule prevents new pods without tolerations from scheduling. PreferNoSchedule tries to avoid scheduling but doesn't guarantee. NoExecute evicts existing pods without tolerations and prevents new ones. NoEvict is not a valid effect.
  2. Step 2: Match requirement to effect

    Since you want to evict existing pods without tolerations, NoExecute is the correct effect.
  3. Final Answer:

    NoExecute -> Option C
  4. Quick Check:

    Evict pods without tolerations = NoExecute = D [OK]
Quick Trick: Use NoExecute to evict pods lacking tolerations [OK]
Common Mistakes:
  • Choosing NoSchedule which doesn't evict existing pods
  • Confusing PreferNoSchedule with eviction
  • Using invalid effect NoEvict

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes