ingress-nginx returns `404 Not Found` (nginx default backend) for `https://shop.example.com`, but the Ingress object exists.
BeginnerTroubleshootingServices, DNS, Ingress and NetworkPolicy
Answer
Likely causes → The controller did not pick up the Ingress or no rule matches: missing or wrong ingressClassName, host differs from the requested host (www. vs apex), path or pathType does not match, or the request reaches a different controller.
Diagnose →
kubectl get ingress shop -n shop -o yaml | yq '.spec'
kubectl get ingressclass
kubectl logs -n ingress-nginx deploy/ingress-nginx-controller | grep shop
curl -sv -H 'Host: shop.example.com' http://<lb-address>/
Fix → Set spec.ingressClassName: nginx, fix host and path (pathType: Prefix with /). Check the controller log for Ignoring ingress because of error.
Prevent → Mark one IngressClass as default (ingressclass.kubernetes.io/is-default-class: "true") and lint Ingresses in CI.
More on Services, DNS, Ingress and NetworkPolicy
`curl http://orders.shop.svc.cluster.local` hangs, and `kubectl get endpointslices -l kubernetes.io/service-name=orders` shows `ENDPOINTS <unset>`.BeginnerEndpoints exist, but `curl orders:80` returns `Connection refused`.BeginnerA Service works when you curl the Pod IP but times out on the ClusterIP from every node.IntermediateInside a Pod, `nslookup orders` returns `;; connection timed out; no servers could be reached`.BeginnerCoreDNS Pods are in CrashLoopBackOff with `[FATAL] plugin/loop: Loop (127.0.0.1:41823 -> :53) detected for zone "."`.IntermediateCalls to `api.stripe.com` from Pods are slow, and CoreDNS logs show `api.stripe.com.payments.svc.cluster.local`, `api.stripe.com.svc.cluster.local` … all `NXDOMAIN`.Intermediate