Cloud Computing

cert-manager Order stays in 'processing' despite HTTP-01 challenge returning correct token from public curl

daviddata
1mo ago
Environment

Environment

Kubernetes 1.25 cluster on cloud VMs, cert-manager v1.8, ingress-nginx controller serving host-based ingress, Let's Encrypt staging used for testing. Ingress has annotations to allow ACME challenges.

Symptoms

Symptoms

cert-manager Certificate resource never becomes Ready. Associated Order/Challenge resources remain in 'processing'; Challenge status shows 'invalidResponse' in cert-manager events. Performing curl https://example/.well-known/acme-challenge/<token> from public internet returns the exact token and a 200.

Observations

Observations

Ingress-nginx access logs include requests for the challenge path and return 200. cert-manager logs show repeated validation attempts. No Cloudflare/CDN in front. DNS A record and HTTP served over port 80. From some public vantage points the challenge returns 404 intermittently. Ingress is served by multiple replicas behind a Service of type LoadBalancer.

Already attempted

Already attempted

Scaled ingress-nginx down to single replica, cleared ingress caches, recreated Certificate resource, switched to staging and prod endpoints; verified Service endpoints, restarted cert-manager pods. None completed challenge validation. No malformed tokens observed.

Question

Question

What causes a CA to report 'invalidResponse' when manual curl from a public host returns the correct token? How can I capture the exact request Let's Encrypt makes and ensure my ingress serves an identical response to their validator?

COMMUNITY RESPONSES

Verified community troubleshooting

1 reply
0
matte_dev Answer
user
Posted 1mo ago • 0 confirmations

Verify whether the CA's validator sometimes hits a different backend than you tested. From several public locations (including -6 and -4), curl the challenge URL and compare headers and body; if some vantage points return 404, your LB or DNS is returning different backends. Temporarily point the domain to a single ingress pod IP or remove AAAA records and re-run validation; if that succeeds, track down the mismatched replica or fix IPv6 routing. Use cert-manager logs and ingress access logs with timestamp/UA filtering to correlate CA requests. If you can’t fix routing quickly, switch to DNS-01 as a safe fallback.

Showing 1 of 1 community responses
AI DIAGNOSTICS

Incident analysis

Updated 1mo ago• Trouble ID

Most likely causes

Load-balancer or Service routes some validation requests to a replica not configured for the challenge (replica missing Ingress or not Ready). 70%
DNS A vs AAAA records cause the CA to hit an IPv6 path that the ingress doesn't serve or routes differently. 55%
Intermittent routing through an external load-balancer or health-check path that returns 404 for /.well-known. 40%

Summary

When a CA reports invalidResponse despite accessible token, common causes include: validation requests occasionally hitting a different backend replica that does not serve the challenge (load-balancer sticky session or readiness issue), IPv6 vs IPv4 mismatch where the token is only served on one address family, intermittent DNS propagation returning different A/AAAA targets, or middleboxes rewriting Host headers. Intermittent 404s from some vantage points imply a routing or replica divergence rather than cert-manager bug.

Suggested Fixes

Diagnostic step 1
From multiple external vantage points (curl from different public endpoints or using online HTTP-check tools), fetch the challenge URL and compare responses and headers.
Diagnostic step 2
Temporarily point the domain to a single ingress replica IP to eliminate LB sharding; retry validation.
Diagnostic step 3
Check for AAAA records and test curl -6 to the domain to see if IPv6 path returns different content; remove AAAA or fix IPv6 routing if mismatched.

Continue troubleshooting

Matched from the title, description and tags