Day 2
Reboot a node
Reboot one node and give it back to the scheduler when it is Ready.
Before you start
Section titled “Before you start”- A person with
pk-metal-approvercan approve. That is you, if your site allows self-approval. If not, it is a second person. See Set up approval permissions. You propose the reboot. - The PodDisruptionBudgets of the workloads let one pod leave.
- The reboot goes through the Talos API. It does not need the BMC.
The steps of the operation
Section titled “The steps of the operation”| Role | Steps |
|---|---|
| Worker | Cordon → Drain → TalosReboot → WaitNodeReady → Uncordon |
| Control plane | The same, with WaitEtcdHealthy before Uncordon |
-
Propose the reboot.
Terminal window pk-metal reboot w-1The command makes one HostOperation, for example
pk-metal/reboot-w-1-x7k2p. -
Approve it. If your site forbids self-approval, ask a second person to approve it.
Terminal window pk-metal approve pk-metal/reboot-w-1-x7k2p -
Monitor the operation.
Terminal window kubectl -n pk-metal get hostoperation reboot-w-1-x7k2p -wThe phase goes from
RunningtoSucceeded.
Options
Section titled “Options”--mode powercycle- A cold start through the firmware. Use it after a firmware change. The default is a warm reboot or a kexec.
--drain-timeout 30m- The drain waits this long for pods to leave. The default is 15 minutes.
--grace-period 60- Each evicted pod gets 60 seconds to stop.
--delete-emptydir-data- Also evict pods with
emptyDirvolumes. You lose their data.
Reboot all nodes
Section titled “Reboot all nodes”Propose one reboot for each node. Approve all of them. Workers reboot in parallel. Control planes reboot one at a time, because the cluster guard holds the others.
Verify
Section titled “Verify”kubectl get talosnode w-1READY is True. The Kubernetes node is schedulable.
If it fails
Section titled “If it fails”| What you see | Go to |
|---|---|
Blocked on ClusterDisruption |
Operation held |
| The drain step fails, the node stays cordoned | Drain stuck |
waitNodeReady fails |
Node not ready |
Related
Section titled “Related”- pk-metal reboot, Self-protection
- mise run lab:day2 reboots a worker and a control plane in the lab.