1. Node Maintenance & Diagnostics
kubectl get nodes -o wideWhat it doesDisplays the status of all cluster nodes with OS versions, IP addresses and Kubelet version
When to use itTo verify the readiness of the nodes (Ready / NotReady) and the correctness of their connection to the Control Plane
Example
kubectl get nodes -o widekubectl describe node <node-name>What it doesDisplays comprehensive details about the node including resource constraints (Allocatable), tags, taints and pressure slices (DiskPressure/MemoryPressure)
When to use itWhen new pods fail to be scheduled on the node or it switches to NotReady
Example
kubectl describe node worker-node-01kubectl get events -A --sort-by=".metadata.creationTimestamp"What it doesFetches all block events sorted in ascending order by time of occurrence from newest to oldest
When to use itTo track obscure problems in the cluster, such as allocation errors or failure of Liveness/Readiness health sensors
Example
kubectl get events -A --sort-by=".metadata.creationTimestamp"kubectl top nodesWhat it doesDisplays the actual CPU and memory consumption of each node in the cluster
When to use itTo evaluate resource pressure and identify nodes with high consumption (requires Metrics Server)
Example
kubectl top nodeskubectl top pods -A --sort-by=cpuWhat it doesDisplays the most processor intensive pods across all namespaces
When to use itto detect services with abnormal consumption and avoid exceeding the limits of available resources
Example
kubectl top pods -A --sort-by=cpukubectl cordon <node-name>What it doesMarks the node as SchedulingDisabled to prevent any new pods from being assigned to it
When to use itAs a first step before performing maintenance or upgrade work on the server
Example
kubectl cordon worker-node-02kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-dataWhat it doesEvicts all removable pods from the node and safely reschedules them on other nodes
When to use itto completely unload the server before rebooting or upgrading the kernel and operating system
Example
kubectl drain worker-node-02 --ignore-daemonsets --delete-emptydir-datakubectl uncordon <node-name>What it doesRemoves the blocking state and restores the node to be ready to receive and schedule new pods
When to use itAfter completing the maintenance work and confirming the stability of the server and its return to work
Example
kubectl uncordon worker-node-02