If you need to reboot a node in your cluster for maintenance or any other reason, performing the following steps will help prevent possible disruption of services on those nodes:
WarningRebooting a cluster node as described here is good for all nodes, but is critically important when rebooting a Bottlerocket node running the
bootsservice on a Bare Metal cluster. If it does go down while running the
bootsservice, the Bottlerocket node will not be able to boot again until the
bootsservice is restored on another machine. This is because Bottlerocket must get its address from a DHCP service.
Cordon the node so no further workloads are scheduled to run on it:
kubectl cordon <node-name>
Drain the node of all current workloads:
kubectl drain <node-name>
Shut down. Using the appropriate method for your provider, shut down the node.
Perform system maintenance or other task you need to do on the node and boot up the node.
Uncordon the node so that it can begin receiving workloads again.
kubectl uncordon <node-name>