Interview's MateKubernetes
Interview's Mate

Kubernetes

K8s · Workloads · GitOps · Cloud

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
Kubernetes topics
Lesson 52/ 160
03. Kubernetes Networking & Traffic Management

Automating SSL/TLS Certificates with cert-manager & Let's Encrypt

Issue and renew TLS certificates automatically with cert-manager and ACME.

Intermediatecert-manager · ACME · TLS3 quiz questions
Practice DevOps Q&A
In plain wordsDiagramTheoryStep by stepWhen to use itInterview cluesMistakes to avoidQuiz (3)Practice

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 -A and 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

Loading interactive 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.

Verify ACME, not only object creation

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.

Key takeaway: cert-manager is implemented only when this invariant remains observable: 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.

Recover from ACME drift

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.

Key takeaway: Accept the trade-off consciously: Automating issuance removes calendar risk, but ACME access, DNS credentials, and certificate controller availability become security-critical dependencies.

How it works, step by step

Step 1 of 4
Traffic author

1. 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.

cert-manager contract → owned state
Key numbers at this step
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 -A in 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 -A first: 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

Built-in API path
Best for: Issue and renew TLS certificates automatically with cert-manager and ACME. A concrete incident check is 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.

Datapath-specific extension
Best for: Quickly testing the ACME assumption with 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.

Managed ingress or mesh
Best for: Teams that need TLS integrated with guardrails; the evidence path is 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 -A without 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?
Interview tip: Interview sequence: state the invariant, run 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

Loading quiz

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.

Open DevOps Q&A →Tech Learn Q&A
Previous topic
Ingress Rules: Path-Based & Host-Based Routing
Next topic
Kubernetes Gateway API (Next-Gen Replacement for Ingress: GatewayClass, Gateway, HTTPRoute)