Kubernetes admission webhook causes API server 404s for gRPC services only when behind AWS NLB with proxy-protocol enabled
Environment
EKS cluster: Kubernetes 1.23 control plane, AWS NLB in front of nginx-ingress-controller Service (type=LoadBalancer) with proxy-protocol v2 enabled; several apps expose gRPC services via HTTP/2 through the ingress.
Symptoms
External gRPC clients intermittently receive 404 from the ingress for long-running gRPC streams; short unary calls succeed. Logs show the ingress pod returning 404 for requests that should route to backends. Direct cluster-internal calls to the Service succeed.
Observations
nginx-ingress-controller logs show HTTP/2 connection resets and 'client sent HTTP/1.1 request without upgrade' style messages preceding 404s. The AWS NLB was recently configured to enable proxy-protocol to preserve client IPs, and the Service annotation on the ingress has service.beta.kubernetes.io/aws-load-balancer-proxy-protocol: '*'. Captured TCP payloads at ingress node show proxy-protocol v2 header present on some connections while absent on others (connections from NLB cross AZs). The admission webhook for validating TLS certificates is configured cluster-wide and returns 200/denied logs show no rejections. No 502/504 errors, only 404 on specific long-lived gRPC streams.
Already attempted
Removed and re-added the proxy-protocol annotation on the Service — temporarily restored some traffic but 404s returned. Disabled the admission webhook (put it in maintenance mode) — no change. Scaling nginx-ingress to two replicas changes which connections hit which pod; 404s follow the pattern of connections arriving with or without proxy-protocol headers.
Question
Why are gRPC streams seeing 404s only when proxy-protocol is toggled on the NLB, and how can I configure the load balancer and nginx-ingress so HTTP/2 gRPC traffic stays intact across AZs without turning off client IP preservation?
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