https://rancher.com/ logo
Title
d

damp-dress-71748

08/04/2022, 1:04 PM
Hello, quick question regarding Rancher-Desktop on Ubuntu, how is it possible to access the services without port-forward. In WSL2, it is straight forward, but for some reason same concept doesn't work here.
f

freezing-airplane-30363

08/04/2022, 1:53 PM
Thing is that under Linux ports bellow 1024 are priviledged by default so RD is unable to route traffic to these services running on these low ports - for eg traefik ingress and other services have to be exposed and accessed over NodePort service type (random port range between 30000-32767).
d

damp-dress-71748

08/04/2022, 1:54 PM
Hi Tomas,
f

freezing-airplane-30363

08/04/2022, 1:55 PM
You may run
sudo sysctl -w net.ipv4.ip_unprivileged_port_start=443
and then you should be able access ingress and other services too directly on https://localhost:443 or on the ports they are running on (but not bellow 443)
d

damp-dress-71748

08/04/2022, 1:56 PM
Even with NodePort, it didnt work. i had to port forward from RD App preference
f

freezing-airplane-30363

08/04/2022, 1:57 PM
Hi, let me try the NodePort way
or maybe firewall? did you try
sudo ufw disable
?
d

damp-dress-71748

08/04/2022, 1:59 PM
yes, tried that as well
f

freezing-airplane-30363

08/04/2022, 2:08 PM
Hmm, NodePort way works for me on Ubuntu 20.04 and RD 1.5
d

damp-dress-71748

08/04/2022, 2:09 PM
let me try to reinstall the whole thing
f

freezing-airplane-30363

08/04/2022, 2:09 PM
this is what I did:
kubectl create deployment nginx --image=nginx  --port=80 --replicas=1
kubectl expose deployment nginx --type=NodePort --port=80
kubectl get svc nginx -o jsonpath='{.spec.ports[0].nodePort}'
> 30449
wget <http://localhost:30449>
please try that before ^