Workflow
Release and reuse
When you delete a HostClaim, the operator releases the machine. A released machine never keeps its node. Release and wipe explains the rules.
Release and reuse a machine
1 / 8
Delete the claim
You delete the HostClaim. The finalizer keeps the claim until the release is complete.
kubectl delete hostclaim -n default node-3Delete the claim. You delete the HostClaim. The finalizer keeps the claim until the release is complete.
kubectl delete hostclaim -n default node-3Propose the release. The node ran on this machine, so the release is one operation that waits for a person. A control plane leaves etcd only when etcd stays safe.
pk-metal approve -n pk-metal release-simhw2288v5000398-…Drain and leave. After approval, the operation cordons and drains the node. A control plane gives etcd leadership to a peer, then leaves etcd.
cordon → drain → etcdForfeitLeadership → etcdLeaveReset. Talos resets the node. The system disk is wiped, with the credentials of the cluster. The operation deletes the Kubernetes Node.
talosReset → deleteKubernetesNodePower off. The operation turns the machine off and ejects the media. The finalizer goes. The Host is Available for a new claim.
powerOff → ejectMediaIf the node does not answer. A node that does not answer cannot drain or reset. The operation removes its etcd member by ID, deletes the Node and turns the machine off.
etcdRemoveMember → deleteKubernetesNode → powerOffWipe. The operator installs nothing on a Host with a node install on its disk. Ask for a wipe and approve it. The wipe image erases the system disk.
pk-metal wipe simhw2288v5000398Free again. The wipe succeeds. The machine is in Talos maintenance mode with an empty disk. The mark goes and the Host is free.
kubectl get host simhw2288v5000398
- Delete the HostClaim, or delete its TalosNode. pk-metal scale can do it for you.
- The HostClaim controller proposes one release HostOperation.
- If the node ran on this machine, the release waits for approval. Approve it with pk-metal approve.
- If the node answers, the operation does these actions:
- Cordon and Drain;
- on a control plane, EtcdForfeitLeadership and EtcdLeave;
- TalosReset, which wipes the system disk;
- DeleteKubernetesNode.
- If the node does not answer, the operation does EtcdRemoveMember on a control plane and DeleteKubernetesNode.
- Then PowerOff and EjectMedia. The Host is
Available. - If the Talos reset did not run, the Host has the condition
DiskWiped=False. Wipe it with pk-metal wipe and approve the wipe.
Release rules
Section titled “Release rules”| Situation | Approval | Disk after the release |
|---|---|---|
| The node ran on the machine, on record | Necessary | Wiped by Talos |
| The node does not answer | Necessary | Not wiped. The Host is marked. |
| No boot reached its check-in step | Not necessary | Not touched |
| The claim has approval Automatic | Not necessary | As above |
| A control plane leave makes etcd unsafe | Refused until you add metal.platform-kit.org/ack-etcd-risk |
- |
"On record" means the hand-off record of the claim, or the check-in step of a boot. It does not mean that the node answers at this moment.
Runbooks for this flow
Section titled “Runbooks for this flow”| Symptom | Runbook |
|---|---|
The release is Failed |
Operation failed |
The claim shows EtcdRiskRefused |
etcd unhealthy or quorum lost |
| The BMC does not answer | BMC unreachable |