Runbook
Drain stuck
Symptoms
Section titled “Symptoms”- Operation
Failedat Drain. The message names the pods that did not leave.- Kubernetes node
SchedulingDisabled.
Impact
Section titled “Impact”The node is cordoned. Its running pods stay. No new pod goes to it.
Diagnose
Section titled “Diagnose”-
Read the message of the failed step.
Terminal window kubectl -n pk-metal describe hostoperation reboot-w-1-x7k2p -
Find the PodDisruptionBudgets that allow no disruption.
Terminal window kubectl --kubeconfig prod.kubeconfig get pdb -A
| Cause | Fix |
|---|---|
| A PodDisruptionBudget allows 0 disruptions | Scale the workload up, or change the budget. |
A pod has an emptyDir volume |
Move the pod. Or propose again with --delete-emptydir-data. You lose the data. |
| A pod does not stop in time | Propose the reboot again with a longer --drain-timeout or --grace-period. These are flags of pk-metal reboot, not of pk-metal retry. |
Correct the cause first. Then find who made the operation. Its spec.reason tells you.
kubectl -n pk-metal get hostoperation reboot-w-1-x7k2p -o jsonpath='{.spec.reason}{"\n"}'| Made by | Reason | Fix |
|---|---|---|
| The operator, for a claim | Provisioning, Release, and others |
Run pk-metal retry pk-metal/reboot-w-1-x7k2p. The operator proposes it again. A person approves it. |
| A person, with pk-metal reboot | Reboot |
pk-metal retry only deletes it. Then propose it again, for example pk-metal reboot --drain-timeout 30m w-1, and get it approved. |
| A rollout | TalosRollout |
The rollout has failed. Follow Rollout paused or plan changed. |
To give the node back without the change, uncordon it:
kubectl --kubeconfig prod.kubeconfig uncordon w-1Verify
Section titled “Verify”A new operation for the node exists and goes past the drain step.
kubectl -n pk-metal get hostoperations