I am trying to build a local Kubernetes Lab on my Machine. I tried it once and it was working well until I restarted my Mac. OS Updates.
After troubleshooting, I realized that the IP address changed. So, I starting looking into how to create an instance with a static IP address. And I found this: https://multipass.run/docs/configure-static-ips
Since I am on Mac, I tried to adapt/readapt. I was not able to create the Interface using UI as described here (https://support.apple.com/en-vn/guide/mac-help/mh43557/mac), maybe because of this: Note: You can’t use bridging if the physical network device used for bridging is a wireless device.
So I had to create it using command line tools:
sudo ifconfig bridge create
sudo ifconfig bridge1 addm en0
sudo ifconfig bridge1 inet 192.168.70.1/24 up
With that, I was expecting to be able to run:
multipass launch --name k8s-cp-01 --network name=bridge1,mode=manual
but this returns an error:
➜ multipass launch --name k8s-cp-01 --network name=bridge1,mode=manual
launch failed: Invalid arguments supplied
Invalid network options supplied
And when I run: ifconfig bridge1
, I see this:
bridge1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 62:3e:5f:85:db:01
inet 192.168.70.1 netmask 0xffffff00 broadcast 192.168.70.255
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x0
member: en0 flags=8003<LEARNING,DISCOVER,MACNAT>
ifmaxaddr 0 port 13 priority 0 path cost 0
Address cache:
5c:e9:1e:86:59:da Vlan1 en0 616 flags=0<>
4c:d5:77:fd:4e:35 Vlan1 en0 1164 flags=0<>
4:f3:52:3:13:ea Vlan1 en0 857 flags=0<>
d4:4f:67:52:e9:75 Vlan1 en0 1044 flags=0<>
MAC NAT list:
en0 192.168.1.152 60:3e:5f:58:f8:54 1198
en0 2001:818:c22f:a200:e0f7:3b5:bacb:e65b 60:3e:5f:58:f8:54 1199
en0 2001:818:c22f:a200:10e7:8ccc:ed86:5905 60:3e:5f:58:f8:54 0
en0 fe80::4b6:9906:e87:8bc5 60:3e:5f:58:f8:54 1194
media: autoselect
status: active
multipass networks
command does not return bridge1
:
➜ multipass networks
Name Type Description
bridge0 bridge Network bridge with en1, en2, en3
en0 wifi Wi-Fi
en1 thunderbolt Thunderbolt 1
en2 thunderbolt Thunderbolt 2
en3 thunderbolt Thunderbolt 3
en4 ethernet Ethernet Adapter (en4)
en5 ethernet Ethernet Adapter (en5)