- Take me to Video Tutorial
In this section, we will take a look at os upgrades.
-
You can purposefully
drain
the node of all the workloads so that the workloads are moved to other nodes.$ kubectl drain node-1
-
The node is also cordoned or marked as unschedulable.
-
When the node is back online after a maintenance, it is still unschedulable. You then need to uncordorn it.
$ kubectl uncordorn node-1
-
There is also another command called cordorn. Cordorn simply marks a node unschedulable. Unlike drain it does not terminate or move the pods on an existing node.