How do you drain a node safely for maintenance?
BeginnerScenarioResources, autoscaling and scheduling
Answer
Situation read → A node needs kernel patching.
What I'd do →
kubectl cordon node-1kubectl drain node-1 --ignore-daemonsets --delete-emptydir-data- Watch for PDB-blocked evictions and fix them
- Patch and reboot
kubectl uncordon node-1
Why → Drain evicts pods through the Eviction API, honouring PDBs and grace periods.
Interview tip → Mention that bare pods are not rescheduled.
More on Resources, autoscaling and scheduling
How do you choose requests and limits for a new service?BeginnerPods are Pending with `0/6 nodes are available: 6 Insufficient cpu`. What do you do?IntermediateExplain QoS classes and which pods get evicted first.IntermediateCPU limits cause latency spikes though average usage is low. Why and what is the fix?IntermediateHow do you configure an HPA on CPU?BeginnerHPA shows `<unknown>/70%` for CPU. What do you do?Intermediate