What it means
ingress-nginx returns 503 when the rule matches but the backing Service has no ready endpoints, and 404 when no rule matches the host and path (or no controller handles the Ingress's class).
Causes and fixes
Most likely first. Run the check, and if it matches, apply the fix.
1. The backend Service has no endpoints
Check:
kubectl get endpoints <svc>
Fix: Fix the Service selector or the Pods' readiness.
2. Wrong service name or port in the Ingress
Check:
kubectl describe ingress <name>
Fix: Point the backend at the existing Service and its port.
3. No controller picks up the Ingress (wrong or missing ingressClassName)
Check:
kubectl get ingressclass; kubectl get ingress <name> -o yaml | grep -i class
Fix: Set ingressClassName to the installed class, or mark one class as default.
Fix it yourself
A live machine in your browser with this problem already on it. The grader checks the result.
Open the labNo account needed for your first tries.
Related errors
- Service has no endpoints
The Service exists, but its selector matches no ready Pods, so connections fail.