Skip to content

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

pk-metal scale writes HostClaims. Control planes join etcd one at a time, as a learner first. They leave one at a time, and the leader leaves last.Youpk-metal scaleHostClaimsone per nodeetcd-writescp-1-cp-2-cp-3-control planes of TalosCluster lab

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 3
  1. 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 3
  2. Apply. 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 --apply
  3. One join at a time. You approve both boots. The operator boots cp-2. It holds cp-3 while cp-2 joins.

    blockedOn: EtcdJoinWaiting
  4. Promote. cp-2 catches up and etcd promotes it to a voter. All members are healthy. Now cp-3 boots and joins.

    waitEtcdHealthy
  5. Three voters. Three voters tolerate one failure. Use an odd number of control planes: 1, 3 or 5.

    pk-metal status
  6. Shrink. 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"
  7. 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 → talosReset
  8. Back 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
  1. Write the TalosNode objects of the new nodes. A TalosNode without a machine is not a member yet.
  2. Show the plan with pk-metal scale. Then run it again with --apply.
  3. Approve the boots with pk-metal approve. The control planes join one at a time.
  4. To remove nodes, run pk-metal scale with a smaller size, or delete the claims.
  5. Approve the releases. Each control plane leaves etcd only when etcd stays safe.
  6. To remove a node for all time, also delete its TalosNode.

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.
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 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.

mise run lab:scale takes the control planes from three to one and back, removes a worker and replaces a control plane.

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