Quiz: Node Lifecycle & Maintenance¶
5 questions
L0 (1 questions)¶
1. What is the difference between cordoning and draining a Kubernetes node?
Show answer
Cordoning marks the node as unschedulable — no new pods will be placed on it, but existing pods continue running. Draining evicts all pods from the node (respecting PodDisruptionBudgets), moving workloads to other nodes. The typical maintenance sequence is cordon first (stop new work), then drain (move existing work), then perform maintenance.L1 (1 questions)¶
1. What does a 'NotReady' node condition mean, and what are common causes?
Show answer
NotReady means the kubelet on that node has stopped reporting healthy status to the control plane. Common causes: kubelet process crashed or is not running, node ran out of disk space (DiskPressure), node ran out of memory (MemoryPressure), network partition between the node and the API server, or the node's certificate expired. Check with kubectl describe node and journalctl -u kubelet on the node.L2 (3 questions)¶
1. Walk through the safe process to upgrade a worker node.
Show answer
1. kubectl cordon node (mark unschedulable).2. kubectl drain node --ignore-daemonsets --delete-emptydir-data (evict pods, respect PDBs).
3. Perform upgrade.
4. kubectl uncordon node. Watch for PDB-blocked drains and local storage.
2. kubectl drain hangs. What could cause this?
Show answer
1. PDB preventing eviction (minAvailable not met).2. Pod with no controller (standalone pod can't be evicted safely).
3. Pod with local storage and no --delete-emptydir-data flag. Check: kubectl get pdb, kubectl get pods -o wide on the node.
3. Why can a PodDisruptionBudget (PDB) cause a drain to get stuck, and how do you resolve it?