Interview Prep/Real-World Interview/DNS, TLS and certificates

A cert-manager Certificate is stuck at "Issuing"; the Challenge says "Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'".

IntermediateTroubleshootingDNS, TLS and certificates
Answer

Likely causes → Let's Encrypt (and cert-manager's self-check) cannot fetch /.well-known/acme-challenge/<token>. Common reasons: the solver Ingress uses the wrong ingressClassName, a redirect or auth rule on the main Ingress intercepts the path, DNS for the host doesn't point at this ingress yet, or a CDN/WAF in front blocks it.

Diagnose →

kubectl get challenge -n prod -o wide
kubectl get ingress -n prod | grep cm-acme-http-solver
curl -v http://app.example.com/.well-known/acme-challenge/test
dig +short app.example.com

Fix → Set the correct class on the Issuer (solvers[].http01.ingress.ingressClassName: nginx), exempt /.well-known/acme-challenge/ from forced auth, and make sure DNS resolves to this ingress. If a CDN sits in front, switch to a DNS-01 solver.

Prevent → Use DNS-01 for anything behind a CDN or private network, and alert on Certificates that are not Ready for more than an hour.

All Real-World Interview questions Roadmap: Interview readiness

More on DNS, TLS and certificates