Kubernetes Ingress returns 404 only for external gRPC clients behind cloud load balancer
Environment
K8s 1.25 cluster on managed control plane, nginx-ingress-controller v1.6 deployed as DaemonSet, services expose containerPort 50051 gRPC; internal cluster clients can call gRPC services successfully (kubectl port-forward and in-cluster pods), external calls from cloud L7 TCP/HTTP(S) load balancer return 404 from ingress.
Symptoms
External gRPC clients attempting to connect over TLS to LB IP:PORT receive HTTP/1.1 404 responses or gRPC status UNIMPLEMENTED; telemetry shows client establishing TLS then immediate 404. Internal tests (curl grpc-health-check via port-forward) succeed.
Observations
nginx-ingress logs show requests hitting other hostnames or default backend for same path, with '404 host not found' entries. The LB is configured with a target of nodePort 30080 and health checks hitting /healthz over HTTP; LB is terminating TLS and forwarding plaintext to nodes. Ingress resource uses 'kubectl describe' and shows hostname 'service.example.com' and annotation ingress.kubernetes.io/backend-protocol: 'GRPC'. ClusterInternal DNS resolves correctly.
Already attempted
Verified service and endpoints; re-deployed ingress with nginx.ingress.kubernetes.io/backend-protocol: 'GRPC' annotation. Switched LB to TCP passthrough mode (no TLS termination) — gRPC connects but has TLS handshake issues since client expects server cert. Mapped LB to a single node and port via nodePort — connection still yields 404. Increased ingress log level and checked ingress-controller configmap for server-snippet — no custom rewrites. Recreated ingress on a test namespace with identical manifests — same 404.
Question
What sequence of reversible checks will identify whether the 404 is caused by the external load balancer (TLS termination/host header rewrite), ingress controller configuration (protocol annotations), or Ingress resource hostname mismatch, and how can I route external gRPC traffic reliably through the current ingress stack?
Verified community troubleshooting
No answers yet..
Incident analysis
Most likely causes
Summary
Suggested Fixes
Continue troubleshooting
Related troubles
Matched from the title, description and tags