Skip to content

Lab · reference

lab.yaml

lab/lab.yaml is the lab spec. It gives the cluster name, the versions, the size and the shape of the machines. mise run lab:render writes all other files of the lab from it.

File
lab/lab.yaml. Set PK_LAB_SPEC to use a different file.
Rendered into
.lab/generated/
Rendered by
mise run lab:render, and mise run lab:up each time it runs.
Default size
One control plane and two workers.
Limit
99 machines.
Unknown keys
An error. The renderer does not ignore a key that it does not know.
Field Default in the file Meaning
cluster.name lab The name of the TalosCluster.
cluster.talosVersion v1.14.6 The Talos release. PK_LAB_TALOS replaces it.
cluster.kubernetesVersion v1.36.2 The Kubernetes release.
cluster.vip 10.77.0.10 The address of the Kubernetes API. It must be below .11.
controlPlanes 1 1, 3 or 5. The renderer refuses an even number.
workers 2 0 or more.
controlPlane { memoryMiB: 4096, cpus: 2 } The shape of each control plane.
worker { memoryMiB: 2048, cpus: 2 } The shape of each worker.
nodes.<name> node-3: { personality: supermicro-x12 } Values for one machine: personality, memoryMiB, cpus.
patches[].inline Time and DNS patches Talos configuration documents. They go into the TalosCluster as they are.
workload None A second cluster for mise run lab:pivot: name, vip, controlPlanes, workers.

The renderer ignores an entry below nodes for a machine that the size does not include. The smallest memory for a machine is 1024 MiB.

The machines have the names node-1, node-2, and so on. The control planes come first. The renderer derives all identity values from the number n, so the files always agree.

Value Rule node-1
Address 10.77.0.<10+n> 10.77.0.11
BMC https://10.77.0.1:<8440+n> https://10.77.0.1:8441
Serial number PKLAB and n with four digits PKLAB0001
Host name The serial number in lower case pklab0001
Tap pktap<n> pktap1
BMC MAC address 02:77:00:00:01:<n> in hexadecimal 02:77:00:00:01:01
NIC MAC address 52:54:00:77:00:<0x10+n> 52:54:00:77:00:11
Disk serial number pklab-disk-<n> pklab-disk-1
File in .lab/generated/ Contents Read by
fleet.yaml The machines that the simulated BMCs serve pk-metal sim
manifests/10-machines.yaml The Secret with the BMC credentials and one Asset for each machine The operator
manifests/20-talos.yaml The TalosCluster and one TalosNode for each machine The operator
manifests/30-claims.yaml One HostClaim for each machine The operator
taps The tap names lab/net.sh
ledger.yaml BMC MAC address to BMC URL The operator. See Ledger.
lab.env Names and counts for lab/lab.sh The lab tasks
workload/ The TalosCluster, TalosNodes and HostClaims of the second cluster mise run lab:pivot

The size of the lab as <control planes>cp+<workers>w, for example 3cp+2w.

To change the size of a lab that runs:

Terminal window
mise run lab:down && mise run lab:reset
PK_LAB_NODES=3cp+2w mise run lab:up

The size of a second cluster, in the same form, for example 1cp+0w.

  • Without a workload section in the spec, the second cluster has the name work and the VIP 10.77.0.9.
  • Its machines come after the machines of the first cluster. With 1cp+0w and 1cp+0w, node-2 is the second cluster.
  • The lab does not install the second cluster at mise run lab:up. mise run lab:pivot installs it.
  • With a second cluster, the first cluster gets a registry mirror for 10.77.0.1:5000.

A Talos release that replaces cluster.talosVersion, for example v1.14.5.

Variable Default Meaning
PK_LAB_DIR <repo>/.lab The directory for the state of the lab.
PK_LAB_SPEC <repo>/lab/lab.yaml The lab spec.
PK_LAB_KIND_CONFIG <repo>/lab/kind.yaml The definition of the kind cluster.
PK_LAB_MIN_FREE_GIB 15 The free disk that the doctor asks for.
PK_LAB_WAIT_TIMEOUT 2400 Seconds for mise run lab:wait, mise run lab:scale, mise run lab:pivot and mise run lab:backup-restore.
PK_LAB_RELEASE_TIMEOUT 900 Seconds for mise run lab:release.
PK_LAB_DAY2_TIMEOUT 1200 Seconds for each reboot in mise run lab:day2.
PK_LAB_ROLLOUT_TIMEOUT 2400 Seconds for a rollout in mise run lab:day2 and mise run lab:upgrade.
PK_LAB_BRIDGE pkbr0 The bridge name. Read by lab/net.sh.
PK_LAB_ADDRESS 10.77.0.1/24 The address of the workstation on the bridge. Read by lab/net.sh.
PK_LAB_TAP_USER The user that starts the lab The owner of the taps. Read by lab/net.sh.
PK_METAL_QEMU Found on the PATH The QEMU binary.
PK_METAL_OVMF_CODE, PK_METAL_OVMF_VARS Found in the system The firmware pair for the machines.

The patches list goes into the TalosCluster. Use it for DNS, time and a proxy.

  1. Edit the patches list in lab/lab.yaml.
  2. Run mise run lab:up before you approve the installs.

See Behind a proxy for an example.