Bird
0
0

Which kubectl command correctly applies a taint env=production:NoExecute to a node named worker-node?

easy📝 Syntax Q3 of 15
Kubernetes - Scheduling
Which kubectl command correctly applies a taint env=production:NoExecute to a node named worker-node?
Akubectl taint node worker-node env=production:NoExecute
Bkubectl taint nodes worker-node env=production:NoExecute
Ckubectl taint nodes worker-node env=production NoExecute
Dkubectl taint nodes worker-node env=production=NoExecute
Step-by-Step Solution
Solution:
  1. Step 1: Identify the correct resource type

    The command uses nodes (plural) to specify the resource type.
  2. Step 2: Use the correct taint syntax

    The taint format is key=value:effect, so env=production:NoExecute is correct.
  3. Step 3: Combine the command

    The full command is kubectl taint nodes worker-node env=production:NoExecute.
  4. Final Answer:

    kubectl taint nodes worker-node env=production:NoExecute -> Option B
  5. Quick Check:

    Resource type plural + key=value:effect format [OK]
Quick Trick: Use plural 'nodes' and key=value:effect format [OK]
Common Mistakes:
  • Using singular 'node' instead of 'nodes'
  • Missing colon between value and effect
  • Using spaces instead of '=' or ':'
  • Incorrect taint syntax like key=value=effect

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes