-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Any path other than "/", e.g. "/foo", and any route other than "/foo" is 404 #3298
Comments
I was following along with https://docs.microsoft.com/en-us/azure/aks/ingress-tls |
Ok, so the secondary routes do work if I explicitly curl them like http://my-host/admin/metrics works, but all the links produced by my service are still http://my-host/metrics. I can't tell if this is the responsibility of ingress or of my service. Is this working as intended? Is rewrite-target causing this? Because nothing works if I remove rewrite-target (and I'm unclear on it's purpose if it's required) |
I needed to set my context path, specifically adminContextPath in dropwizard, so that it knows to start from |
Please check https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/#rewrite |
@aledbf Yes, I'm using that annotation as can be seen above. It did not work for the secondary route as explained. |
@aledbf are you trying to say I need to do this:
? |
@aledbf And that example does not use those annotation. It's like a riddle |
I am sorry for that but we cannot provide examples for all the annotations. Please keep in mind this is a community project. |
@aledbf Yes, I don't want to be a bother anymore hence why I closed the issue, but I'm just letting you know that what seems to me a very simple ingress setup does not work in how I imagined it and I can't figure it out based on the documentation. I'm afraid everyone involved is too familiar with the technology and jargon to explain it to me. Hopefully I can get it to work by setting the adminContextPath in dropwizard; otherwise, I'm going to have to use an nginx-ssl-proxy or similar |
I got the same error and found your issue first. After some more googling I found this good resolution: #1120 (comment) |
I have a dropwizard server with an application port and an admin port. I'm trying to get the application on / and the admin on /admin, but I can only get the application to work for all links. Admin only works for the root page of the admin service.
So I tried to simplify it and I'm just trying to get a single service on /foo, but only the root /foo link works. All other links strip the /foo part and are 404.
Maybe I'm missing something, but this seems to be the whole point of ingress, so I'm a bit baffled.
Am I supposed to configure my backend service to expect this different root path?
I thought if you just had a service with 3 ports, you could just map them to /, /foo, /bar respectively.
This is what I set out to do:
But I thought maybe the paths being on the same service was an issue, so tried this:
The text was updated successfully, but these errors were encountered: