I was trying to add an Ingress controler to my K8s cluster by following this guide setup nginx
I did everything until the DNS record point and it always redirects me to 404 not found. I check everything I could check so I really need help please.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: yeebus-ingress
spec:
rules:
- host: auth.yeebus-test.online
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: auth-api-service
port:
number: 80
- host: auth.yeebus-test.online
http:
paths:
- path: "/"
pathType: Prefix
backend:
service:
name: email-api-service
port:
number: 80
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello thanks for the reply. Changing the host didn’t help but I tried what you recommended and found few interesting things.
This is what my email deployment looks like and the label should be email-api but when I tried
I have that error message : No resources found in default namespace.
Same when I try to show ingress logs : No resources found in ingress-nginx namespace.
But when I used the describe action.
auth.yeebus-test.online / auth-api-service:80
email.yeebus-test.online / email-api-service:80
And I checked the backends IP addresses were the correct one
This comment has been deleted
Hi there,
Did removing the duplicated host help with the 404 errors? And did you apply the changes after you updated the yaml file?
If you are still seeing the issue, a few things that you could check would be:
Check the status of the services to which the Ingress is routing:
Make sure that the services have the correct pods selected and are receiving traffic correctly.
Make sure the services have the correct endpoints associated:
Check if the pods for your services are running and healthy:
Check the logs of the Nginx Ingress controller to see if there are any issues or helpful messages:
Check that the Ingress Controller itself is running without issues. If using Helm:
Describe the Ingress resource to see if there are any annotations or statuses that might give a clue:
Let me know how it goes!
Best,
Bobby