Day 1
Pivot the operator
Run the operator on the Talos cluster that it installed, and stop the bootstrap cluster on your workstation.
Before you start
Section titled “Before you start”- The bootstrap cluster (usually kind) is the current kubeconfig context.
- You have the kubeconfig of the target cluster, for example
mgmt.kubeconfig. - No operation runs. No rollout is under way. No claim is in deletion. pk-metal status shows this.
- The target has storage for the media store, or you accept
--media-store=ephemeral. - The target can reach each BMC, and each BMC can reach the target. See Network checklist.
- The operator image is in a registry that the nodes of the target can pull from. An image that you loaded into kind is not. See Install the operator.
- The target has a node that accepts ordinary pods: a worker, or control planes with
controlPlane.allowScheduling: true.
How the move works
Section titled “How the move works”Move the operator (pivot)
2 / 8
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.kubeconfigBootstrap. The operator starts in a small bootstrap cluster, for example kind on a workstation. It installs the first Talos cluster.
kind create clusterPreflight. 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.kubeconfigPause 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-replicasInstall. 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)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, approvalsStart. 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>:30443Settle. pivot watches the new manager for 90 seconds. A new operation is a failure: a move never boots, powers or changes a machine.
--settle 90sDone. 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.
-
Make sure that nothing runs.
Terminal window pk-metal status -
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:4f0c2d1a9b3eWithout
--image, the target uses the image reference of the source. -
Read the list of network paths that the command shows. Check it with your network team.
-
Type
yto start.The last lines say that the new manager runs and settled.
-
Make the target your current context, and examine the fleet.
Terminal window pk-metal --kubeconfig mgmt.kubeconfig status -
When you do not need the bootstrap cluster, delete it. Use the name of your kind cluster.
Terminal window kind delete cluster --name bootstrap
Verify
Section titled “Verify”pk-metal statuson the target shows each Host in the same phase as before.- Each handed-off claim shows
HandedOff. - No new HostOperation exists.
Roll back
Section titled “Roll back”If it fails
Section titled “If it fails”| 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. |
Related
Section titled “Related”- pk-metal pivot, Pivot model, Self-protection
- mise run lab:pivot runs the move in the virtual lab.