-
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
Ingress-nginx-defaultbackend overrides application's 404 error #12446
Comments
This issue is currently awaiting triage. If Ingress contributors determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
You said you configured 404 in the configMap and you also say you don't want 404 to be response from defaultbackend. This is not possible. |
/kind support |
Ofcourese I want 404 response from defaultbackend but only for unmatched paths (404) in ingress. and If ingress path is matched but the application/api (running inside the pod) returns 404 error at that time don't want to redirect the traffice on default-backend instead error should be appear exactly same what application returns |
I am not sure if there is that intelligence in the controller code. |
It is fixed by removing the 404 value form |
Here is configuration what I have done to route the 404 and 503 errors on defaultbackend:
404
and503
errors in a ConfigMap calledcustom-error-pages
.defaultBackend
in theingress-nginx
Helm chart.custom-error-pages
ConfigMap as a volume to the default backend Pod.extraVolumeMounts
to serve the custom HTML files.ingress-nginx-controller
ConfigMap to include thecustom-http-errors
key with values404,503
to indicate these errors should be served by the default backend.It is working as per the expectation but there is an issue, With this configuration
default-backend
overrides the applications's 404 errors also, I don't want that, If any application returns a 404 error then it should use that page only, traffice should not be routed on default-backend pod at that time.If any one can help here to fix this please.....
The text was updated successfully, but these errors were encountered: