Bird
0
0

After running kubectl drain node-2 --ignore-daemonsets, what is the expected state of node-2?

medium📝 Command Output Q5 of 15
Kubernetes - Troubleshooting
After running kubectl drain node-2 --ignore-daemonsets, what is the expected state of node-2?
ANode-2 is uncordoned and pods continue running
BNode-2 is cordoned and all pods except daemonsets are evicted
CNode-2 is deleted from the cluster
DNode-2 is rebooted automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand drain command effect

    The drain command marks the node unschedulable and evicts pods except daemonsets when --ignore-daemonsets is used.
  2. Step 2: Confirm node state after drain

    Node-2 will be cordoned and pods evicted except daemonsets.
  3. Final Answer:

    Node-2 is cordoned and all pods except daemonsets are evicted -> Option B
  4. Quick Check:

    Drain = cordon + pod eviction except daemonsets [OK]
Quick Trick: Drain cordons node and evicts pods except daemonsets [OK]
Common Mistakes:
  • Thinking drain deletes node
  • Assuming node is uncordoned after drain
  • Believing node reboots automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes