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!
Yesterday I saw that i wrote the same host twice but I changed it.
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:
kubectl get svc auth-api-service email-api-service
Make sure that the services have the correct pods selected and are receiving traffic correctly.
Make sure the services have the correct endpoints associated:
kubectl describe svc auth-api-service email-api-service
Check if the pods for your services are running and healthy:
kubectl get pods -l <your-label-selector>
Check the logs of the Nginx Ingress controller to see if there are any issues or helpful messages:
kubectl logs -l app=nginx-ingress -n <nginx-ingress-namespace>
Check that the Ingress Controller itself is running without issues. If using Helm:
helm list -n <namespace-of-ingress-controller>
Describe the Ingress resource to see if there are any annotations or statuses that might give a clue:
kubectl describe ingress yeebus-ingress
Let me know how it goes!
Best,
Bobby
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.