Q: Your Ingress is returning 404 for a path that you've configured. What do you check?
1. Check the Ingress resource — kubectl describe ingress <name> — verify the path and service name are correct.
Want to master this scenario in a live sandbox? KodeKloud's CKA & CKAD Hands-On Certification Track covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "In one of our high-traffic production clusters, our SRE team handled this incident using a standardized runbook. When addressing this question, I walk the interviewer through our production incident runbook: isolating the blast radius, checking diagnostic logs and metrics, and applying a safe fix."
Initial Diagnostics & Root Cause Analysis
- Check the Ingress resource —
kubectl describe ingress— verify the path and service name are correct. - Check the IngressClass — does the Ingress have the right
ingressClassName? If multiple controllers exist (nginx, traefik), the wrong one might be handling it. - Check path type —
ExactvsPrefixvsImplementationSpecific.Exactonly matches/api, not/api/users. UsePrefixto match all subpaths.
Remediation & Permanent Safeguards
Execute the resolution runbook and verify workload health:
- Check backend service — is the service name and port correct? Does the service have endpoints?
- Ingress controller logs —
kubectl logs -n ingress-nginx— nginx logs will show 404 details.
- Check the Ingress resource — kubectl describe ingress — verify the path and service name are cor...
- Check the IngressClass — does the Ingress have the right ingressClassName? If multiple controller...
- Check path type — Exact vs Prefix vs ImplementationSpecific. Exact only matches /api, not /api/us...
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
-
Configuring Service selector labels that mismatch underlying Pod manifest metadata when configuring Ingress returning path
A typo in
spec.selectorcauses the Service endpoints list (kubectl get endpoints) to remain empty, resulting in503 Service Unavailableor timeouts. -
Omitting explicit ingressClassName specifications when running multiple ingress controllers when configuring Ingress returning path
Without an explicit
ingressClassName, ingress resources are either ignored or picked up unpredictably by competing controllers. -
Depleting worker node subnet IP address allocations under VPC CNI or Azure CNI when configuring Ingress returning path
Direct VPC pod networking allocates real subnet IPs; failing to monitor IP pools causes new pods to stay stuck indefinitely in
ContainerCreating. - Attempting network triage without inspecting kubectl describe service and EndpointSlice resources when configuring Ingress returning path Verifying EndpointSlice population immediately determines whether a connectivity failure is caused by pod labeling, readiness probes, or routing.