Skip to content

Instantly share code, notes, and snippets.

@kleo
Created January 4, 2026 00:07
Show Gist options
  • Select an option

  • Save kleo/b2b6100c68d61296401543ec92dcde6b to your computer and use it in GitHub Desktop.

Select an option

Save kleo/b2b6100c68d61296401543ec92dcde6b to your computer and use it in GitHub Desktop.
k3s agent using multipass bridged network on mac os
# multipass setup
$ multipass networks
$ multipass set local.bridged-network=en0
$ multipass launch -c 4 -m 8G -d 10G --bridged -n mac-worker-1
$ multipass shell
$ sudo nano /etc/netplan/50-cloud-init.yaml
# multipass netplan static ip example for mac-worker-1
```
network:
version: 2
ethernets:
default:
match:
macaddress: "ma:ca:dd:re:ss"
dhcp-identifier: "mac"
dhcp4: true
extra0:
match:
macaddress: "ma:ca:dd:re:ss"
optional: true
dhcp-identifier: "mac"
dhcp4: false
dhcp4-overrides:
route-metric: 200
addresses:
- <ip address>/24
```
sudo netplan apply
sudo reboot
# add multipass worker to cluster
curl -sfL https://get.k3s.io | K3S_URL="https://<ip>:6443" K3S_TOKEN=<token> sh -s - --node-ip <your multipass bridged ip address> --node-external-ip <your multipass bridged ip address>
# reference in setting up k3s with multipass
https://andreipope.github.io/tutorials/create-a-cluster-with-multipass-and-k3s.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment