Lab · reference
Lab prerequisites
The virtual lab runs on a Linux workstation or a CI runner. mise run lab:doctor checks each item on this page and prints the fix for each item that is missing.
At a glance
Section titled “At a glance”- System
- Linux on x86-64, with KVM and cgroup v2. See Operating systems.
- Memory
- About 12 GiB free for the default size.
3cp+2wneeds about 19 GiB. - Disk
- 15 GiB free below
.lab/ - Container engine
- Docker Engine, as root.
- Packages
- QEMU,
qemu-img, OVMF,ip,iptables,curl,sudo - Tool manager
- mise
- Tools from mise
go,kind,kubectl,talosctl,yq,jq- Check
- mise run lab:doctor
Operating systems
Section titled “Operating systems”| System | Result | Reason |
|---|---|---|
Linux on x86-64, with /dev/kvm |
Works | The project builds and tests the lab on it. |
| Linux on ARM64 | Not supported | The machines are x86-64 QEMU machines. KVM runs them only on an x86-64 host. |
| macOS | Does not work | There is no KVM, and Docker Desktop cannot get to the lab bridge. A Linux virtual machine with nested virtualization can work. Nobody tested it. |
| Windows with WSL2 | Not tested | WSL2 must give /dev/kvm, cgroup v2 and Docker Engine in the WSL2 system, not Docker Desktop. |
Install the packages
Section titled “Install the packages”-
Install the packages for your distribution.
Distribution Command Debian, Ubuntu sudo apt-get install qemu-system-x86 qemu-utils ovmf curl iproute2 iptablesFedora sudo dnf install qemu-system-x86-core qemu-img edk2-ovmf curl iproute iptables-nftRHEL 9, Rocky, Alma sudo dnf install qemu-kvm qemu-img edk2-ovmf curl iproute iptables-nftOther distributions Not tested. Install the same programs. If the doctor does not find them, set PK_METAL_QEMU,PK_METAL_OVMF_CODEandPK_METAL_OVMF_VARS. -
Install Docker Engine. Use the instructions for your distribution. See Container engine.
-
Install mise. Use the mise instructions.
-
In the root of the repository, let mise read the file
mise.toml.Terminal window mise trust -
Install the pinned tools.
Terminal window mise install -
Put the pinned tools on the
PATHof your shell. The tasks (mise run ...) do not need this step. The commands that you type, for examplekubectl, need it.Terminal window eval "$(mise activate bash)"For zsh, use
mise activate zsh. As an alternative, putmise exec --before each command. -
Check the workstation.
Terminal window mise run lab:doctorThe last line is
the workstation has what the lab needs.
On RHEL and its rebuilds, QEMU is /usr/libexec/qemu-kvm. The fleet finds it there.
Memory
Section titled “Memory”The doctor adds the memory of all machines and 3072 MiB for kind and the fleet. It compares the sum with the available memory.
| Role | Default memory | Default CPUs |
|---|---|---|
| Control plane | 4096 MiB | 2 |
| Worker | 2048 MiB | 2 |
| Size | Machines | The doctor asks for |
|---|---|---|
1cp+2w (default) |
3 | 11264 MiB |
1cp+0w |
1 | 7168 MiB |
3cp+2w |
5 | 19456 MiB |
To change the memory of a role or of one machine, edit lab.yaml.
Container engine
Section titled “Container engine”The lab needs Docker Engine that the docker service of the system runs as root.
| Engine | Result | Reason |
|---|---|---|
| Docker Engine, as root | Works | The kind node is on a bridge of the workstation. |
podman, podman-docker |
Does not work | The lab uses the DOCKER-USER chain of Docker. |
| Docker Desktop | Does not work | The engine runs in a virtual machine. The kind node cannot get to the lab bridge. |
| Rootless Docker | Does not work | The kind node is not on a bridge of the workstation. |
What the doctor checks
Section titled “What the doctor checks”| Check | Fix when it is missing |
|---|---|
go, kind, kubectl, talosctl, yq, jq |
mise install |
curl |
Install the package. |
| The Docker daemon answers | Install Docker Engine and start it. |
| Docker is Docker Engine, as root | Remove podman-docker. Do not use Docker Desktop or rootless Docker. |
| The kind configuration is readable | Set or unset PK_LAB_KIND_CONFIG. |
| cgroup v2 | Boot with systemd.unified_cgroup_hierarchy=1, or use an older node image. See Lab troubleshooting. |
/dev/kvm is usable |
Set virtualization to on in the firmware. Join the group kvm. |
QEMU and qemu-img |
Install the packages, or set PK_METAL_QEMU. |
| OVMF | Install the package, or set PK_METAL_OVMF_CODE and PK_METAL_OVMF_VARS. |
ip and iptables |
Install iproute2 and iptables. |
sudo |
Use a terminal where sudo can ask for the password. |
firewall-cmd, if firewalld is active |
Install firewalld. |
NO_PROXY includes 10.77.0.0/24, if a proxy is set |
See Behind a proxy. |
https://factory.talos.dev answers |
Give the workstation access, or set a proxy. |
https://ghcr.io answers |
Give the machines access through the workstation. |
| The lab spec renders | The message names the line to correct in lab/lab.yaml. |
| Available memory | Stop other programs, or use a smaller size. |
Free disk below .lab/ |
Free some space, or set PK_LAB_DIR. |
The doctor changes nothing. The sudo check can ask for your password.