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

Monday morning every browser shows "NET::ERR_CERT_DATE_INVALID" for app.example.com; the cert is from Let's Encrypt via cert-manager.

BeginnerTroubleshootingDNS, TLS and certificates
Answer

Likely causes → The certificate expired because renewal silently failed. Let's Encrypt certs live 90 days and cert-manager renews at around 30 days left, so the renewal had been failing for weeks: a broken HTTP-01 path, a DNS-01 credential that expired, or a rate limit.

Diagnose →

echo | openssl s_client -connect app.example.com:443 -servername app.example.com 2>/dev/null | openssl x509 -noout -dates
kubectl get certificate,certificaterequest,order,challenge -A
kubectl describe certificate app-tls -n prod
kubectl logs -n cert-manager deploy/cert-manager | grep -i error | tail

Fix → Fix the challenge path or credentials, then force a reissue with cmctl renew app-tls -n prod. If issuance will take too long, upload a manually issued cert as the TLS Secret to stop the bleeding.

Prevent → Alert on certmanager_certificate_expiration_timestamp_seconds - time() < 14*24*3600 and run an external blackbox probe that checks days-to-expiry from outside the cluster.

All Real-World Interview questions Roadmap: Interview readiness

More on DNS, TLS and certificates