Skip to content

Day 1

Pivot the operator

Run the operator on the Talos cluster that it installed, and stop the bootstrap cluster on your workstation.

Move the operator (pivot)

2 / 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

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

pk-metal pivot has the full list of what each step does.

  1. Make sure that nothing runs.

    Terminal window
    pk-metal status

    No operation is in the phase Running.

  2. Start the move. Give the media address on a node of the target, and the image in your registry.

    Terminal window
    pk-metal pivot --to mgmt.kubeconfig --media-url https://192.0.2.11:30443 \
    --image registry.example.org/platform/pk-metal:4f0c2d1a9b3e

    Without --image, the target uses the image reference of the source.

  3. Read the list of network paths that the command shows. Check it with your network team.

  4. Type y to start.

    The last lines say that the new manager runs and settled.

  5. Make the target your current context, and examine the fleet.

    Terminal window
    pk-metal --kubeconfig mgmt.kubeconfig status
  6. When you do not need the bootstrap cluster, delete it. Use the name of your kind cluster.

    Terminal window
    kind delete cluster --name bootstrap
  • pk-metal status on the target shows each Host in the same phase as before.
  • Each handed-off claim shows HandedOff.
  • No new HostOperation exists.

See Move back after a pivot.

What you see Fix
The move refuses to start The message says what to do. Do it, then run the same command again.
The move stops in the middle Run the same command again. It continues from where it stopped.
The target has no storage Give it a default StorageClass, or use --media-store=ephemeral.
The manager pod on the target shows ImagePullBackOff The nodes cannot pull the image. Push it to a registry, then run the command again with --image.
The manager pod on the target stays Pending No node accepts the pod. Add a worker, or set controlPlane.allowScheduling: true and let the rollout complete. Then run the command again.
The new operator proposed an operation The move fails and names it. See Move back after a pivot.