Skip to content

Tutorial

Pivot in the lab

At a real site, the operator starts in a small bootstrap cluster and installs the first Talos cluster. Then it moves to that cluster. In this tutorial, you do this move in the lab.

Before the pivot, the operator runs in kind and manages the first cluster. After the pivot, the operator runs on the first cluster, kind is gone, and the operator installs a second cluster.BeforekindoperatorCluster labnode-1node-2offmanagesAfterCluster labnode-1 + operatorCluster worknode-2installskinddeleted
Before and after the pivot. After it, the first cluster manages its own machine and installs the second cluster.
  • The operator on the first Talos cluster, lab.
  • No kind cluster.
  • A second Talos cluster, work, that the operator installed from its new place.
Time
About 30 minutes.
Before
Your first cluster in the lab
Memory
About 11 GiB free: two control planes with 4 GiB each, and kind.
Lab
Down. Step 1 starts a lab with two clusters of one machine each.
  1. If a lab runs, stop it and delete the disks.

    Terminal window
    mise run lab:down && mise run lab:reset
  2. Start the lab. PK_LAB_WORKLOAD adds the second cluster to the spec.

    Terminal window
    PK_LAB_NODES=1cp+0w PK_LAB_WORKLOAD=1cp+0w mise run lab:up
  3. Install the first cluster.

    Terminal window
    mise run lab:wait
  1. Run the pivot round.

    Terminal window
    mise run lab:pivot
  2. Follow the output. Each line that starts with == is one part.

mise run lab:pivotexample
$ mise run lab:pivot
== image registry on 10.77.0.1:5000
== operator image to 10.77.0.1:5000
== pk-metal pivot to TalosCluster lab
== deleting the kind cluster pk-metal
  the lab's kubeconfig names TalosCluster lab now
== TalosCluster work, installed by the operator on lab
  [2026-01-15 10:40:12 UTC] hosts: 1 Assigned, 1 Provisioned; operations: 1 Running, 1 Succeeded; claims held: none; workload nodes Ready: 1
converged after 288s: 2 Provisioned hosts, 1 Ready nodes in work
The operator runs on TalosCluster lab and installed work from there.
  the operator's cluster: .lab/kubeconfig (also .lab/workload.kubeconfig)
  the second cluster:     .lab/second.kubeconfig and .lab/second.talosconfig
A replay with example data.
Part What happens
Image registry A registry at 10.77.0.1:5000 gets the operator image. The first cluster pulls it from there.
pk-metal pivot The operator stops in kind. Its objects move. The operator starts on the cluster lab.
Delete kind The task deletes the kind cluster. .lab/kubeconfig now names the cluster lab.
Second cluster The task applies .lab/generated/workload/, approves the install, and waits.

The move fails if the operator proposes an operation for a machine that has an installed system. See Pivot model. mise run lab:pivot gives the flags that the task uses.

  1. Make sure that kind is gone.

    Terminal window
    kind get clusters

    The cluster pk-metal is not in the list.

  2. Show the operator on the first Talos cluster.

    Terminal window
    kubectl --kubeconfig .lab/kubeconfig -n pk-metal get pods
  3. Show the nodes of the second cluster.

    Terminal window
    kubectl --kubeconfig .lab/second.kubeconfig get nodes
    Terminal window
    NAME STATUS ROLES AGE VERSION
    node-2 Ready control-plane 3m v1.36.2
  4. Show the rack. The tasks now speak to the first Talos cluster.

    Terminal window
    mise run lab:status
  1. Stop the lab and delete the disks.

    Terminal window
    mise run lab:down && mise run lab:reset

    The disk of node-1 holds the moved operator. Do not start a new lab from that disk.

lab:up refuses to start kind again until you run lab:down. See lab troubleshooting.