FULL AI ANALYSIS

Kubernetes Ingress returns 404 for POST requests only when client uses HTTP/2 to the edge (ingress-nginx misroutes upgraded requests)

Generated Oct 17, 2026, 9:26:12 AM

Analysis summary

When clients connect with HTTP/2, requests include pseudo-headers (:method, :scheme, :authority, :path). In some controller or config paths, the mapping from HTTP/2 pseudo-headers to NGINX variables used for routing can differ or be altered by edge proxies, causing mismatches against ingress rules which often rely on host/path. If :authority or path normalization changes (e.g., port appended), the ingress controller may not match the configured host/path and return 404. The fact that disabling HTTP/2 at the edge stops the problem implicates header translation or ALPN proxying behavior between edge and ingress-nginx.

Possible causes

Ingress controller (nginx) misinterprets HTTP/2 pseudo-headers when client connects over h2; :authority value differs (includes port or case difference) causing host/path-based ingress rule mismatch

70%

Fronting load balancer or proxy alters the :path or :authority during HTTP/2->HTTP/1.1 translation (e.g., not normalizing encoded characters), producing non-matching path for Ingress rules

55%

Ingress-nginx configuration snippet or custom middleware strips or rewrites method/pseudo-headers for HTTP/2 leading to route lookup failure for POST specifically

30%

Bug in specific ingress-nginx (controller) release when using HTTP/2 with certain annotation combinations — regression in path matching logic

25%

Suggested fixes

1

Diagnostic step 1

Temporarily disable HTTP/2 on the fronting ALB or proxy to confirm mitigation (you have done this). While disabled, capture full request flows with both HTTP/2 and HTTP/1.1 for comparison using tcpdump or proxy traces to see exact :authority and :path differences.

2

Diagnostic step 2

Check ingress rules for exact host/path matching; add an ingress rule or annotation to accept both host variants (with and without port) or normalize host headers using nginx ingress config-snippets to trim port from Host before matching. This is reversible by removing snippets if problematic.

3

Diagnostic step 3

Upgrade ingress-nginx to the latest patch release if not already done; review controller changelog for HTTP/2 pseudo-header fixes. Test the upgrade in staging with HTTP/2 enabled to see if the regression is already patched.

4

Diagnostic step 4

If the fronting proxy performs HTTP/2 termination, ensure it sets the Host header exactly as expected (no appended ports) when proxying to ingress-nginx, or use proxy_protocol if supported. Configure the proxy to preserve :authority correctly.

5

Diagnostic step 5

If you can craft a minimal reproducible case, file a bug with the ingress-nginx project including NGINX config, ingress resource, and captured request traces; escalate to SRE if production impact is high while you keep HTTP/2 disabled at the edge as a temporary measure.