Skip to the page

Networking for operators · mid

TLS certificates and chains

A TLS certificate must be valid, match the name and come with its full chain. Automatic renewal can fail quietly, and a missing intermediate breaks some clients while browsers still work.

The notes

What you must know

  • Check a certificate with openssl s_client -connect host:443 -servername host, piped to openssl x509 -noout -dates -subject -issuer.
  • With cert-manager use kubectl get certificate, describe, and get certificaterequest, order and challenge to see why renewal fails.
  • cert-manager renews at two thirds of the lifetime by default, so a failing renewal shows up weeks before expiry. Alert on days left, not only on the Certificate status.
  • Common renewal failures: the HTTP-01 challenge path is blocked by a redirect, WAF or ingress change; DNS-01 credentials expired; rate limits.
  • Clients need leaf, then intermediate, then a root they already trust. The server must send the leaf and the intermediates, never the root.
  • Browsers often cope with a missing intermediate by caching or by fetching it (AIA). Many Java, Android, Go, curl and device clients do not, so they fail.
  • Serve the full chain file, for example in Nginx ssl_certificate. In a Kubernetes TLS secret, tls.crt holds the leaf plus intermediates.
  • Fast restore during an outage: fix the challenge and renew, switch to another challenge type, or load a certificate by hand as a temporary step. Never tell users to click through warnings.

The red pen

Common traps: mistake → fix

  • Mistake: If Chrome works, the certificate is fine

    Fix: other clients need the full chain.

  • Mistake: Auto renewal means never expiry

    Fix: monitor expiry and the renewal objects.

  • Mistake: The root certificate must be sent with the chain

    Fix: send leaf and intermediates only.

Easy to hard

Questions interviewers ask, easy to hard

  1. The certificate expired at 2 am although we use auto renewal. How do you find out why?
  2. Android users get certificate errors and browsers do not. What is wrong?
  3. What does a correct chain look like?
  4. What would you alert on to prevent this?

Explain it out loud

Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.

Practise by voice

Your first interview is free

Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.

Start your free interview