Workflow
Add and remove nodes
The size of a cluster is the set of its TalosNode objects that hold a machine through a HostClaim. To change the size, add or delete claims. The operator keeps etcd safe on each step. Node lifecycle explains the rules.
Add and remove control planes
1 / 8
Plan
pk-metal scale prints which machines the cluster gains, and in which order. Without --apply it changes nothing.
pk-metal scale lab --control-planes 3Plan. pk-metal scale prints which machines the cluster gains, and in which order. Without --apply it changes nothing.
pk-metal scale lab --control-planes 3Apply. With --apply the command writes one HostClaim for each new node. The operator proposes a boot for each claim.
pk-metal scale lab --control-planes 3 --applyOne join at a time. You approve both boots. The operator boots cp-2. It holds cp-3 while cp-2 joins.
blockedOn: EtcdJoinWaitingPromote. cp-2 catches up and etcd promotes it to a voter. All members are healthy. Now cp-3 boots and joins.
waitEtcdHealthyThree voters. Three voters tolerate one failure. Use an odd number of control planes: 1, 3 or 5.
pk-metal statusShrink. To go back to one, the plan removes two control planes. Two voters is an even count, so the plan needs your reason.
pk-metal scale lab --control-planes 1 --apply --ack-etcd-risk "lab test"Leave one at a time. After approval, one control plane leaves etcd, then the next. The leader leaves last, so etcd elects a new leader once only.
drain → etcdForfeitLeadership → etcdLeave → talosResetBack to one. cp-2 and cp-3 are reset and turned off. Their Hosts are Available again. etcd has one healthy voter.
pk-metal status
- Write the TalosNode objects of the new nodes. A TalosNode without a machine is not a member yet.
- Show the plan with pk-metal scale. Then run it again with
--apply. - Approve the boots with pk-metal approve. The control planes join one at a time.
- To remove nodes, run pk-metal scale with a smaller size, or delete the claims.
- Approve the releases. Each control plane leaves etcd only when etcd stays safe.
- To remove a node for all time, also delete its TalosNode.
Join rules
Section titled “Join rules”The operator holds the boot of a control plane with blockedOn: EtcdJoinWaiting while:
- another control plane of the same cluster boots or leaves;
- an etcd member is not healthy, or is still a learner;
- etcd still has a member with the name of the new node.
Leave rules
Section titled “Leave rules”| After the removal | Without metal.platform-kit.org/ack-etcd-risk |
|---|---|
| No member stays | Refused |
| Fewer healthy members than a majority | Refused |
| An even number of members | Refused |
| The leader leaves with other control planes | Waits, the leader leaves last |
| Another control plane joins or leaves | Waits |
| The member list cannot be read | Waits |
pk-metal scale, replace and reinstall accept --ack-etcd-risk "<reason>".
Replace and reinstall
Section titled “Replace and reinstall”- Replace a node that works
- Add the new node first. Remove the old node when the new node is a voter.
- Replace a node on failed hardware
- Use pk-metal replace. The node keeps its name and moves to another machine.
- Install a node again
- Use pk-metal reinstall. The operator drains, resets and installs the node on the same machine.
Try it in the lab
Section titled “Try it in the lab”mise run lab:scale takes the control planes from three to one and back, removes a worker and replaces a control plane.
Runbooks for this flow
Section titled “Runbooks for this flow”| Symptom | Runbook |
|---|---|
The claim shows EtcdRiskRefused or RemovalWaiting |
etcd unhealthy or quorum lost |
| A new node is not Ready | Node not ready |
A Host shows DiskWiped=False |
Release and reuse |