Kubernetes
Nodes Commands
Manage the worker machines in your cluster. Learn to inspect node health, cordon for maintenance, drain workloads, and troubleshoot node-level issues.
11 commands
Pro Tips
Use 'kubectl top nodes' to see CPU and memory usage across all nodes (requires metrics-server).
Before maintenance: 'kubectl cordon node' prevents new pods, 'kubectl drain node' evicts existing ones.
Use node labels and nodeSelector/affinity to control which nodes run specific workloads.
Common Mistakes
Don't forget to 'kubectl uncordon' nodes after maintenance - they won't receive new pods otherwise.
Draining nodes with pods using local storage requires '--delete-emptydir-data' flag.