This message was deleted.
# rancher-desktop
a
This message was deleted.
f
I don't understand the question; which network are you talking about? Are you having a routing conflict?
Or do you want Rancher Desktop to use an external IP address in your local network range for the Kubernetes ingress (traefik)?
That should happen automatically when you run Rancher Desktop with admin privileges: it will create a bridged network on the highest priority host network adapter that has an IP address when you start Rancher Desktop (so usually your Wifi or Ethernet one).
Not much more I can say without more information...
w
Sorry for not being clear, When installing rancher desktop the network used by default is 172.17.0.0.16 which conflicts with my internal network. Therefore, the containers that run inside Rancher Desktop do not communicate with external services. I need to change the network that docker climbs to when installed by rancher.
w
not running 1.6.1 so may have changed, but I would expect ~/Library/Application\ Support/rancher-desktop/lima/_config/networks.yaml would be where to start. I would have expected a network on the private classC though.
f
@wide-mechanic-33041 No, the
networks.yaml
is about the bridged and shared interfaces only; @white-yacht-56857's issue seems to be with the internal docker network inside the VM. Since it overlaps with his local network, he is not able to route packets to other machines on the local net.
👍 1
Copy code
$ rdctl shell ip a show docker0
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:27:6b:85:8f brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0
       valid_lft forever preferred_lft forever
w
got it nesting dolls problem and this isn’t a route leakage, but if that container needs resources on the host routed network than you have the conflict.
f
Ok, I managed to get it to work, but this may break in future releases:
Copy code
$ echo '{"bip":"172.20.0.1/16"}' | rdctl shell sudo tee /etc/docker/daemon.json
You have to execute this while Rancher Desktop is running. Then stop and restart it. Afterwards the docker bridge should use the new network range:
Copy code
$ rdctl shell ip a show docker0
5: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
    link/ether 02:42:5f:b0:5f:23 brd ff:ff:ff:ff:ff:ff
    inet 172.20.0.1/16 brd 172.20.255.255 scope global docker0
       valid_lft forever preferred_lft forever
Note that
bip
must be a valid gateway address, so you can't specify
x.y.z.0/nn
. Don't ask me how I know! 😄
Right now we don't create
daemon.json
, but we might in the future, so blindly overwriting it as I do above may create problems.
316 Views