Rancher desktop is an easy GUI utility to run k3s. Under the hood it's using lima and qemu. It gives the option to use containerd or docker. And allows for easy port forwarding.
Personally I like to set up rancher desktop clusters with the latest stable kubernetes, containerd and traefik enabled. Though I disable the flannel cni, as I prefer to use cilium.
Provisioning my environment is as follows:
1. Install rancher desktop. (I do this by installing the cask in my nix configuration)
2. Adding `"/Users/mark/.rd/bin"` to my `$PATH` (again, I do this with nix configuration)
3. Dropping the following override file in place for the k3s install and node provisioning.
`~/Library/Application Support/rancher-desktop/lima/_config/override.yaml`
```yaml
env:
INSTALL_K3S_EXEC: '--flannel-backend=none --disable-network-policy --cluster-cidr=10.42.0.0/16 --service-cidr=10.43.0.0/16 --node-cidr-mask-size-ipv4=24'
provision:
- mode: system
script: |
#!/bin/sh
set -e
# needed for cilium
mount bpffs -t bpf /sys/fs/bpf
mount --make-shared /sys/fs/bpf
mkdir -p /run/cilium/cgroupv2
mount -t cgroup2 none /run/cilium/cgroupv2
mount --make-shared /run/cilium/cgroupv2/
```
> Note: I've added some extra parameters to the `INSTALL_K3S_EXEC` line so that I may refer to this and override those values later.
I also run this:
`rdctl set --kubernetes.options.flannel=false`
But I don't know if this does anything.
I then use `cilium-cli` to install cilium. By running `cilium install`.