Rebooting bare metal nodes
To reboot a bare metal node in place without triggering a reprovision, pause the Machine first.
The simplest reboot is a reprovision: delete the Machine object for the bare metal node and Syself Autopilot rebuilds it. But when the local disk holds data that would take too long to re-sync, reboot the machine in place instead. This page shows how.
Step 1: Set the paused annotation#
In the Syself Autopilot cluster, set the paused annotation for the machine:
$ kubectl annotate machine your-cluster-md-abc-xyz-ijk cluster.x-k8s.io/paused=true
Double-check that you don't have a typo in the annotation. Otherwise, the node will get flagged as not functional and the machine will get reprovisioned.
Step 2: Drain the node#
In your workload cluster, drain the node:
$ kubectl drain bm-your-cluster-12345678 --ignore-daemonsets
And wait until all the pods are terminated. You can check with this command:
$ kubectl get pods --all-namespaces --field-selector spec.nodeName=bm-your-cluster-12345678
Step 3: Reboot the server#
Now, you can SSH into the server, and perform any needed maintenance tasks.
If you are unsure how to do that, refer to the How to SSH into nodes guide.
For rebooting it, type this in the server shell:
$ reboot
Step 4: Add the node back#
First, uncordon the node in your workload cluster:
$ kubectl uncordon bm-your-cluster-12345678
And, in the Syself Autopilot cluster, remove the pause annotation:
$ kubectl annotate machine your-cluster-md-abc-xyz-ijk cluster.x-k8s.io/paused-
Now the node is a functional member of the cluster again.