# Which command would you use to drain a node for maintenance?

Kubernetes, Medium (Advanced), Commands. https://k8wiz.com/uquiz/which-command-would-you-use-to-drain-a-node-for-maintenance

- A. kubectl drain <node-name>
- B. kubectl cordon <node-name> --drain
- C. kubectl maintenance <node-name>
- D. kubectl node drain <node-name>

**Answer:** kubectl drain <node-name>

**Explanation:** The 'kubectl drain <node-name>' command safely evicts all pods from a node before you perform maintenance on it. It marks the node as unschedulable to prevent new pods from being scheduled to it, and then evicts the pods to other nodes.
