Automating SSL/TLS Certificates with cert-manager & Let's Encrypt
Issue and renew TLS certificates automatically with cert-manager and ACME.
In plain words
cert-manager is an automated building manager that orders a permit, proves address ownership, files the key, and renews it before deadline. The simple Kubernetes rule is: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
Think of it like…
cert-manager is an automated building manager that orders a permit, proves address ownership, files the key, and renews it before deadline.
Where you’ve seen it
During a connectivity incident, the network owner runs kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A. Expected evidence: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry. If the run instead shows this symptom, stop and restore the last known state: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
Words you’ll hear
- cert-manager
- For this lesson, cert-manager is the controlling idea: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- ACME
- ACME is the checkpoint; run
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -Aand inspect the owner chain. A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works. - TLS
- TLS is the outcome to preserve; the cost is explicit: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
- Verification evidence
- The evidence command is
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A. It connects the declaration to this behavior: Issue and renew TLS certificates automatically with cert-manager and ACME.
Visual diagram
Theory & deep dive
How cert-manager reaches the intended state
Issue and renew TLS certificates automatically with cert-manager and ACME. Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
The concrete checkpoint is kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A; compare the cert-manager owner, ACME state, and TLS outcome instead of treating YAML acceptance as proof.
Run kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A after the change and correlate the result with Events and the owning object. Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
ACME: failure boundary and production cost
A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works. The prerequisite contract is concrete: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies. A safe design limits blast radius, records the last good configuration, and uses kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A as a deterministic rollback checkpoint.
Capture the current state with kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A, then correct the controlling manifest rather than patching a child object; the relevant divergence signal is specific: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
How it works, step by step
Step 1 of 41. Define the reachability contract
Declare selectors, listeners, routes, or policy and keep endpoint readiness explicit: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Goal
- Issue and renew TLS certificates automatically with cert-manager and ACME.
- Owner
- cert-manager
When to use it & trade-offs
What it is
Issue and renew TLS certificates automatically with cert-manager and ACME. Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
Why it matters: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works. The invariant at risk is specific: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry. The quickest fact check before changing the design is kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A.
When to reach for it
- Use cert-manager to enforce this invariant: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Use ACME evidence from
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -Ain reviews and incident timelines. Issue and renew TLS certificates automatically with cert-manager and ACME. - Choose the managed ingress or mesh route only when this cost is justified by governance or scale: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
When to avoid or be careful
- Avoid assuming cert-manager is complete after YAML submission; the required behavior is concrete: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Avoid treating the next symptom as random; check the owner and state with
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -Afirst: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works. - Avoid adopting a heavier platform wrapper before measuring its cost: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
Native, manual, and managed paths for cert-manager
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A.Strengths: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
Watch out: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies. Recovery must also recognize this signal: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A; the expected invariant is: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.Strengths: kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A gives immediate feedback without first building a platform layer.
Watch out: A manual change can hide drift, and unlike cert-manager, it does not make this symptom self-documenting: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A.Strengths: Platform controls can wrap this exact behavior in policy or dashboards: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
Watch out: The added platform ownership buys value at this cost: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
Interview signals & numbers to know
When this topic comes up
- Interview anchor: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Trace cert-manager to TLS through ACME; the invariant is: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Recognize the symptom: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
- Justify the cost: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
- Verify with kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A instead of only inspecting YAML.
Benchmarks & rules of thumb
- 90
- days is a typical Let's Encrypt certificate lifetime
- 1/3
- of issued duration is a common remaining-lifetime threshold that triggers renewal, subject to cert-manager settings
- 2
- standard ACME challenge paths are HTTP-01 and DNS-01
Common mistakes & follow-ups
Common interview mistakes
- Debugging only the child object misses the cert-manager owner contract: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry.
- Ignoring this telltale condition leads to unrelated changes: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works.
- Repeating
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -Awithout an owner for remediation wastes retry cost. Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.
Likely interviewer follow-ups
- How would API output and runtime evidence prove this behavior: cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry?
- Which owner object, logs, and Events would you inspect for this symptom-A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works-?
- At what threshold would this cost become unacceptable: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies?
kubectl get certificate,certificaterequest,order,challenge -A; kubectl describe challenge -A, name the failure, then justify the cost. Invariant: Cert-manager reconciles Issuer or ClusterIssuer and Certificate resources, solves ACME challenges, stores the resulting keypair in a Secret, and renews before expiry. Failure: A public DNS or HTTP-01 route that reaches the wrong ingress, rate limiting, or an expired root account can hold a Certificate in Pending while existing TLS still works. Cost: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.Knowledge check
Put it into practice
Practice related interview Q&A
Apply Automating SSL/TLS Certificates with cert-manager & Let's Encrypt with generative AI interview Q&A and hands-on practice.