Command
kubectl cordon <node-name>Explanation
The 'kubectl cordon' command marks a node as unschedulable, meaning no new pods will be placed on it, though existing pods continue to run. It's typically used before maintenance or draining operations. Cordoning ensures workload stability while preparing a node for updates or removal.
Common Use Cases
- •Prepare a node for maintenance or upgrades
- •Temporarily stop scheduling on a specific node
- •Prevent new workloads from landing on unstable hardware
Best Practices
- ✓Always cordon before draining to prevent new pods from scheduling
- ✓Label or annotate cordoned nodes for clarity in large clusters
Common Mistakes to Avoid
- ⚠Assuming cordon evicts existing pods — it only blocks new scheduling
- ⚠Forgetting to uncordon the node after maintenance
Troubleshooting
Problem: New pods still appear on the node after cordoning
Solution: Ensure the scheduling was triggered before the cordon or by a controller ignoring taints.
Examples
Mark the specified node as unschedulable
kubectl cordon node-1