-
-
Notifications
You must be signed in to change notification settings - Fork 555
Description
Description
When running colima with --kubernetes, the VM IP is passed to k3s in the --advertise-address parameter. However, the IP may not yet have actually been assigned to the network interface, which means that --advertise-address is called without any IP which causes the service to fail with:
Aug 07 09:08:56 colima k3s[5836]: Error: invalid argument "--flannel-iface" for "--advertise-address" flag: failed to parse IP: "--flannel-iface"
Version
colima version 0.8.3
git commit: 6a6da99
limactl version 1.2.1
Operating System
- macOS Intel <= 13 (Ventura)
- macOS Intel >= 14 (Sonoma)
- Apple Silicon <= 13 (Ventura)
- Apple Silicon >= 14 (Sonoma)
- Linux
Output of colima status
INFO[0000] colima [profile=kubernetes] is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] address: 192.168.64.6
INFO[0000] docker socket: unix:///$HOME/.colima/kubernetes/docker.sock
INFO[0000] containerd socket: unix:///$HOME/.colima/kubernetes/containerd.sock
Reproduction Steps
- Create a new VM with k3s enabled:
colima start -k -p <profile> - Be unlucky
- See that the VM comes up but you cannot connect to it with
kubectl:
$ kubectl get pods
E0806 16:47:11.670843 1573 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: Get \"https://192.168.64.6:59300/api?timeout=32s\": dial tcp 192.168.64.6:59300: connect: no route to host"
Expected behaviour
The k3s installation should wait for a certain period of time for an IP to be assigned to the interface, rather than assume that it will always have been assigned already.
Additional context
I have never been able to reproduce this myself, yet one of my colleagues can pretty reliably reproduce it.