CertGrid CertGrid
Hands-on Lab·Certified Kubernetes Administrator

Draining a Node for Maintenance

kubectl drain refuses twice before it works, and each refusal names the flag it wants: DaemonSet pods, then pods with no controller. Cordon on its own moves nothing - the four pods already there stay put.

Scheduling and Placement Guide 44 of 103 Intermediate

Two nodes, which is the useful size: drain one and the work has exactly one place to go.
Server NameIP AddressOSRolesCPURAMHDD
CKA3001192.168.0.185Ubuntu 26.04 LTSControl Plane Node2 Core4 GB50 GB
CKA3001-NODE01192.168.0.186Ubuntu 26.04 LTSWorker Node (the one being drained)2 Core4 GB50 GB

This guide includes

Use this before taking a node out for maintenance. This matters because kubectl drain refuses twice before it works, and each refusal names the flag it wants - DaemonSet Pods and local data are both things it will not decide for you.

Before you start

  1. Cordon stops new work and moves nothing

  2. Drain refuses, and says why

  3. The two flags it asked for

  4. A pod with no controller is different again

Official sources