Take a node out of service
- 12 min
- 6 steps
- Scheduling and nodes
Steps
0 of 6 done
Read a Node object, cordon it, and drain it past the three kinds of pod that kubectl drain refuses by default.
Step 1 of 6
Show everything the API knows about
kx-worker2: its conditions, its capacity and allocatable resources, and the Lease its kubelet renews.Checked against what your commands print.
Step 2, not started: List every pod bound to
kx-worker2, in every namespace, so you know what a drain will have to move.Step 3, not started: Stop the scheduler from placing any more pods on
kx-worker2without touching the pods already running there.Step 4, not started: Drain
kx-worker2. A plain drain refuses three kinds of pod; read its error, decide what each override gives up, and drain again until it reports the node drained. ThewebDeployment must end with three ready replicas.Step 5, not started: List the pods on
kx-worker2again. Only the node agents run by DaemonSets should be left.Step 6, not started: Maintenance is done. Let the scheduler use
kx-worker2again.
Enter runs the command. Tab completes, and the arrow keys recall earlier commands. Control C stops a watch. On an empty line, or after Escape, Tab moves focus out of the terminal.