lima
lima copied to clipboard
Forwarded port accessible only on localhost
Description
I started a new lima vm with the k8s.yaml manifest.
I'm able to browse a Kubernetes service of type LoadBalancer exposed on port 30674 but only on localhost:
curl http://127.0.0.1:30674
If I try on the local network interface en0 ip I got a connection refused:
curl http://192.168.1.126:30674
Please use the "Bug" template to report issues and fill in all the details regarding to OS and RD versions etc.
From the interface name "en0" I gather that you are on macOS, where Rancher Desktop will attempt to create a bridged network and use that for your cluster, so it has its own IP address and no port conflicts with the host.
Run kubectl get svc -A and check the external IP of your LoadBalancer.
I have the same issue, tried with k3s, even the port on mac bind to 0.0.0.0, it can only be accessed with localhost or 127.0.0.1
You can change the hostIP to 0.0.0.0 in the yaml
https://github.com/lima-vm/lima/blob/3c9eb1b8906f911b7273e455d06a4cfd891203ab/examples/default.yaml#L314-L318