Bird
0
0

Which of the following is the correct syntax to add a taint to a node named node1 that repels pods without the matching toleration?

easy📝 Syntax Q12 of 15
Kubernetes - Scheduling
Which of the following is the correct syntax to add a taint to a node named node1 that repels pods without the matching toleration?
Akubectl taint nodes node1 key=value:NoSchedule
Bkubectl label nodes node1 key=value:NoSchedule
Ckubectl taint pods node1 key=value:NoSchedule
Dkubectl tolerate nodes node1 key=value:NoSchedule
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct command for tainting nodes

    The command to add a taint is kubectl taint nodes followed by node name and taint details.
  2. Step 2: Check the options

    kubectl taint nodes node1 key=value:NoSchedule uses the correct syntax. kubectl label nodes node1 key=value:NoSchedule uses label instead of taint. kubectl taint pods node1 key=value:NoSchedule tries to taint pods, which is invalid. kubectl tolerate nodes node1 key=value:NoSchedule uses a non-existent command.
  3. Final Answer:

    kubectl taint nodes node1 key=value:NoSchedule -> Option A
  4. Quick Check:

    Use kubectl taint nodes for taints = A [OK]
Quick Trick: Use 'kubectl taint nodes' to add taints, not labels or pods [OK]
Common Mistakes:
  • Using 'label' instead of 'taint'
  • Trying to taint pods instead of nodes
  • Using wrong command like 'tolerate'

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes