Bird
0
0

You want to ensure Pods only run on nodes with label gpu=true and avoid nodes with taint dedicated=gpu:NoSchedule. Which combination achieves this?

hard📝 Workflow Q8 of 15
Kubernetes - Scheduling
You want to ensure Pods only run on nodes with label gpu=true and avoid nodes with taint dedicated=gpu:NoSchedule. Which combination achieves this?
AUse taints on Pods and nodeSelector gpu=true
BUse nodeSelector: gpu=true without tolerations
CUse affinity rules for gpu=true and no tolerations
DUse nodeSelector: gpu=true and add tolerations for dedicated=gpu:NoSchedule
Step-by-Step Solution
Solution:
  1. Step 1: Understand nodeSelector and taints

    nodeSelector restricts nodes by label; taints prevent scheduling unless tolerated.
  2. Step 2: Combine nodeSelector and tolerations

    To schedule on tainted nodes, Pods must have matching tolerations.
  3. Final Answer:

    Use nodeSelector: gpu=true and add tolerations for dedicated=gpu:NoSchedule -> Option D
  4. Quick Check:

    nodeSelector + tolerations needed to schedule on tainted nodes [OK]
Quick Trick: Tolerate taints and select nodes by label to schedule Pods [OK]
Common Mistakes:
  • Ignoring need for tolerations on tainted nodes
  • Using affinity without tolerations for taints
  • Confusing taints on nodes with taints on Pods

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes