Case
Kubernetes: Ingress returns 404 or 503
Ingress exists but traffic fails. Service ports, endpoints, and ingress controller logs are validated.
Case Summary
- ProblemIngress URL returns 404/503 even though resources exist.
- SolutionCheck service selectors/ports, ensure endpoints exist, confirm ingress class and rules, then apply fixes.
- Toolskubectl get svc/endpoints/ingress · ingress-nginx logs
- OutcomeIngress routes correctly to the service and the app becomes reachable.
Commands used (examples)
kubectl get pods -n <ns>kubectl describe pod <pod> -n <ns>kubectl logs <pod> -n <ns> --previouskubectl get events -n <ns> --sort-by=.lastTimestamp | tailsystemctl status <service> --no-pagerjournalctl -u <service> -n 200 --no-pager