Contents

Kubernetes OS Upgrades

When the Node is Offline

Note
Kubernetes wait 5 minutes that is configured in Controller Manager.
If the Node is still offline after 5 minutes, Kubernetes will create the PODs to other Nodes.
After then the Node comes to online, the Node is empty.

Configure Eviction Time

1
kube-controller-manager --pod-eviction-timeout=5m0s

cordon Node

cordon
The cordon makes the Node is not possible to schedule any POD.
Mark the Node unscheduled.
After cordon, you cannot use describe
1
2
3
4
5
# Structure
kubectl cordon <node-name>

# Example
kubectl cordon node01

uncordon Node

uncordon
The uncordon makes the Node is possible to schedule the PODs.
Mark the Node scheduled.
1
2
3
4
5
# Structure
kubectl uncordon <node-name>

# Example
kubectl uncordon node01

drain Node

drain
The drain is going to move the POD to other Nodes.
The drain is executing cordon together.
1
2
3
4
5
# Structure
kubectl drain <node-name>

# Example
kubectl drain node01

OS Upgrade Process