Skip to content

Workflow

Pivot

At a new site no cluster exists yet. The operator starts in a bootstrap cluster and installs the first Talos cluster. Then pk-metal pivot moves the operator onto that cluster. Pivot model explains what moves.

Move the operator (pivot)

1 / 8

pk-metal pivot pauses the operator in the source cluster, installs it on the target cluster, copies the objects, starts the target manager and watches it.bootstrap cluster (kind)Talos cluster mgmtOperator-pk-metal objects-Operator-pk-metal objectsnew UIDsYoupk-metal pivotPreflightrefuses or goes onBMCs and machinesno change during the movecopymanagesmanages

Bootstrap

The operator starts in a small bootstrap cluster, for example kind on a workstation. It installs the first Talos cluster.

kind create cluster
  1. Bootstrap. The operator starts in a small bootstrap cluster, for example kind on a workstation. It installs the first Talos cluster.

    kind create cluster
  2. Preflight. pivot refuses to start while an operation runs, an operation waits for approval, a rollout runs, or the target has no storage for the media store.

    pk-metal pivot --to mgmt.kubeconfig
  3. Pause the source. pivot scales the source manager to zero and waits until it stops. It does not delete it. Annotations on the namespace record the move.

    metal.platform-kit.org/pivoted-to, metal.platform-kit.org/pivot-replicas
  4. Install. pivot installs the CRDs, the admission policies, the roles and the manager on the target. The manager has zero replicas.

    CRDs → policies → RBAC → namespace → Deployment (0)
  5. Copy. pivot copies Secrets, Assets, Hosts, claims, operations and Talos objects with their status. It writes the new UIDs into each reference.

    spec.claimRef.uid, owner references, approvals
  6. Start. pivot starts the target manager and waits for its leader lease. The target manager now reaches the BMCs and the nodes.

    --media-url https://<node address>:30443
  7. Settle. pivot watches the new manager for 90 seconds. A new operation is a failure: a move never boots, powers or changes a machine.

    --settle 90s
  8. Done. The operator runs on the machines that it manages. Self-protection now holds power actions on its own control planes. Delete the kind cluster when you no longer need it.

    kind delete cluster --name <name>
  1. Start a bootstrap cluster, for example kind, and install the operator.
  2. Install the first Talos cluster with Rack to running node.
  3. Make sure that the new cluster reaches each BMC and node. See the table below.
  4. Run pk-metal pivot --to mgmt.kubeconfig. Give --media-url with a node address of the new cluster.
  5. The command does these steps in order: preflight, pause the source, install, copy, start, settle.
  6. Watch pk-metal status for some time.
  7. Delete the bootstrap cluster when you no longer need it.
From To Why
Each node of the new cluster Each BMC, HTTPS Redfish
Each node of the new cluster Each installed machine, port 50000 Talos API
Each BMC The new cluster, NodePort 30443 The BMCs get boot media
Each node of the new cluster The image factory The operator registers installer images

mise run lab:pivot moves the lab operator from kind onto the lab cluster. Pivot in the lab shows each step.