https://rancher.com/ logo
#k3d
Title
a

adamant-ram-8166

05/02/2022, 7:22 PM
Feeling really dumb here. Created a cluster with the following commands on my Macbook Pro M1 and am able to connect over localhost just fine, but when I try it on my Ubuntu desktop I can't connect. I've got Rancher Desktop installed and configured with docker/moby on both. 🧵
w

wide-garage-9465

05/02/2022, 7:40 PM
Hey there 👋 You mean connect to the API via kubectl or to port 80? What error do you see?
a

adamant-ram-8166

05/02/2022, 7:41 PM
port 80 (or 443) as shown by the last
curl
command
kubectl
works fine
Copy code
$ kubectl cluster-info
Kubernetes control plane is running at <https://0.0.0.0:37777>
CoreDNS is running at <https://0.0.0.0:37777/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy>
Metrics-server is running at <https://0.0.0.0:37777/api/v1/namespaces/kube-system/services/https:metrics-server:https/proxy>

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
w

wide-garage-9465

05/02/2022, 7:47 PM
Ah.. didn't realize that that was an expandable snippet 🤦‍♂️
❤️ 1
a

adamant-ram-8166

05/02/2022, 7:47 PM
All good
w

wide-garage-9465

05/02/2022, 7:50 PM
Does it work if you bind to a non-privileged port? (I actually never tried k3d with RD, so just asking some questions.. I could give it a try tomorrow)
👀 1
a

adamant-ram-8166

05/02/2022, 7:50 PM
Rather confused why
docker ps
shows the port bindings yet
$ lsof -i :80 | grep LISTEN
shows nothing on that port
w

wide-garage-9465

05/02/2022, 7:57 PM
Not sure how it works, but could it be that port-forwarding from RD to your localhost doesn't work? (I didn't do research and have no clue how RD does networking)
a

adamant-ram-8166

05/02/2022, 9:19 PM
I might need to learn more about port fowarding w/ RD on Ubuntu. I just didn't have to do anything on the Macbook to get it to work
non-privileged port seems to be fine. just can't wrap my head around why 80/443 would work on macOS and without sudo 😂
Additional context for anyone that comes along, I was using this guide which suggests privileged ports are ok. I'm assuming it works on macOS because I granted RD sudo privileges. I also did the same for my Ubuntu machine.
w

wide-garage-9465

05/03/2022, 5:22 AM
Maybe someone in #rancher-desktop can answer that part 🤔
a

adamant-ram-8166

05/03/2022, 2:14 PM
Appreciate the help. Don't think it's a DR issue just yet since I'm creating the cluster with k3d. RD is just, afaik, managing the moby/docker runtime for me. I'm also disabling traefik via
--k3s-arg "--disable=traefik@server:0"
(see above snippet). Keeping traefik enabled results in the same situation, though
Thanks for that link, it's helpful
👍 1
2 Views