rancher-desktop: Default Traefik not working properly on Rancher Desktop because not routable IP to the instance
- Right now all ports above
1023 are auto-forwarded to localhost, but for privileged ports this has to be done manually. Right now the default Traefik installed with Rancher Desktop does not really work properly due to this; will be good to have a routable IP address for the instance so we can make Traefik work properly and use the corresponding ports for HTTP/HTTPS (80, 443).
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 10
- Comments: 19 (16 by maintainers)
Commits related to this issue
Thanks for bringing this up. We are aware of the problem and already working on a solution.
Nowadays anything
.localhostshould route to127.0.0.1somyingress.rancher.localhostshould work and than if traefik is running with port 80 and 443 bound. That should work on both Windows, Linux and MacOS.The problem on Linux becomes that port 80 and 443 is not able to be used for traefik ingress. You would need to use
sudo sysctl net.ipv4.ip_unprivileged_port_start=80or figure out the correctsudo setcap cap_net_bind_service=+ep /path/to/rancher-desktopI am currently not running on Linux so I don’t know the exact path to rancher-desktop or potentially that would be needed for the k3s binary?
See #1668
The root cause is the same between macOS and Linux, but the fixes will have to be different.
First localhost: this works on macOS because we can bind privileged ports to
0.0.0.0as a regular user, whereas on Linux you would have to be root (or at least have the NET_BIND capability).On macOS we should have a routable port once the
vde_vmnetwork is completed.On Linux we will need to create a
tapdevice for this, and we don’t have that work scheduled yet. So this will not happen in time for the next release.systemd-resolvedwill resolve domains with TLD.localhostto loopback device. For example, this is on my Ubuntu 21.10 desktop with no other configuration around DNS: