-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
traefik ingress using localhost on linux #1668
Comments
Thanks for filing the issue @dmlond @adamkpickering |
I am running Ubuntu 20.04, not macOS. |
I know, you already described it. I just did a double-check on different macOS version in order to track/find regression issues. |
@dmlond @adamkpickering this seems to be related/similar to the rootless mode which doesn't allow to open ports under 1024 (see: https://rootlesscontaine.rs/getting-started/common/sysctl/#optional-allowing-listening-on-tcp--udp-ports-below-1024). I did the following tests after I deployed the resources @dmlond mentioned:
$ kubectl get all -n web
NAME READY STATUS RESTARTS AGE
pod/whoami-658756b586-6zhgr 1/1 Running 1 (91s ago) 7m46s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/whoami-service ClusterIP 10.43.94.177 <none> 8080/TCP 7m46s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/whoami 1/1 1 1 7m46s
NAME DESIRED CURRENT READY AGE
replicaset.apps/whoami-658756b586 1 1 1 7m46s
$ kubectl get ingress -A
NAMESPACE NAME CLASS HOSTS ADDRESS PORTS AGE
web whoami <none> whoami.oasis.local.development 192.168.5.15 80 21m
$ curl http://whoami.oasis.local.development/
curl: (7) Failed to connect to whoami.oasis.local.development port 80 after 0 ms: Connection refused
$ sudo sysctl net.ipv4.ip_unprivileged_port_start
net.ipv4.ip_unprivileged_port_start = 1024
$ sudo sysctl net.ipv4.ip_unprivileged_port_start=80
net.ipv4.ip_unprivileged_port_start = 80
$ curl whoami.oasis.local.development
Hostname: whoami-658756b586-6zhgr
IP: 127.0.0.1
IP: 10.42.0.44
RemoteAddr: 10.42.0.47:40448
GET / HTTP/1.1
Host: whoami.oasis.local.development
User-Agent: curl/7.81.0
Accept: */*
Accept-Encoding: gzip
X-Forwarded-For: 10.42.0.42
X-Forwarded-Host: whoami.oasis.local.development
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: traefik-58b759688b-t5rdx
X-Real-Ip: 10.42.0.42 Can you try it on your end and hopefully this should work. |
@nunix I had the same issue (Ubuntu 21.10; only difference from ticket description being that I'm using browser's automatic .localhost url redirect to localhost instead of changing /etc/hosts for that) and yes, your solution solved it. Perhaps such NOTE/WARNING messages should be present in General (or at least Port Forwarding or Trhoubleshooting) section of Rancher Desktop app on Linux distros out of the box (or at least titles and links to such known issues in docs). |
Would it not be better to use |
Actual Behavior
When running rancher-desktop on my macbook (intel) I can create a deployment, service, and Ingress, and access the service using 127.0.0.1. I cannot do this on my Ubuntu 20_04 linux with rancher-desktop (both use dockerd)
Steps to Reproduce
create the following resources in rancher-desktop using kubectl
create an entry in /etc/hosts mapping whoami.oasis.local.development to 127.0.0.1
curl http://whoami.oasis.local.development
Result
on the mac, this works, but on linux I get connection refused on port 80
Expected Behavior
I should see the response from the service
Hostname: whoami-658756b586-zjf65
IP: 127.0.0.1
IP: 10.42.0.17
RemoteAddr: 10.42.0.13:48154
GET / HTTP/1.1
Host: whoami.oasis.local.development
User-Agent: curl/7.64.1
Accept: /
Accept-Encoding: gzip
X-Forwarded-For: 10.42.0.9
X-Forwarded-Host: whoami.oasis.local.development
X-Forwarded-Port: 80
X-Forwarded-Proto: http
X-Forwarded-Server: traefik-6bb96f9bd8-rfgtf
X-Real-Ip: 10.42.0.9
Additional Information
No response
Rancher Desktop Version
1.0.1
Rancher Desktop K8s Version
v1.22.6(stable)
Which container runtime are you using?
moby (docker cli)
What operating system are you using?
Ubuntu
Operating System / Build Version
20.04
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
deb
Windows User Only
No response
The text was updated successfully, but these errors were encountered: