Need help with Rancher Desktop networking on macOS...
# rancher-desktop
b
Need help with Rancher Desktop networking on macOS. Using Rancher Desktop for docker only at this moment, so no kubernetes running. To simulate our production setup while developing I have three containers running. One mysql database, one backend system exposing port 8080, and a nginx reverse proxy that listens on port 80 and forwards requests to the backend system, or my local machine if the request matches a specific path. Communication to containers and between the containers works fine, but I can’t get the reverse proxy to forward requests to my local machine. Execing in to the container and trying to curl my local machine results in
Failed to connect to host.docker.internal port 8081: Connection refused
. From a shell in the virtual machine (rdctl shell) I can access my service using host.lima.internal, so communication out of the virtual machine seems to work. I think I have tried all combinations of Administrative access and socket-vmnet, but nothing seems to work. Would really appreciate any pointers on where to look to get this working.
m
Not sure if I am correct, but have you tried the Port Forwarding option?
w
best option would be to keep the traffic in the VM vs bouncing over the host interfaces. compose and a dockernet basically. but yeah i would check out forwarding and then what name to use.
b
Solved my problem. Started the containers with this flag:
--add-host=host.docker.internal:host-gateway
Removing it solves the problem, found the solution in this open issue.
👍 1
Thanks for the pointers tough 😉
498 Views