TLS Certificate Management With Cert-Manager on Kubernetes
Cert-manager automates certificate renewal, but monitoring and access controls keep it dependable.

Sponsored by Porter
- Written by
- Ship It Yourself Editors
- Published
- November 30, 2026
- Reading time
- 8 min read
What this covers
An expired TLS certificate can take production down even when the application is healthy. Cert-manager removes the manual renewal work behind that avoidable outage by treating certificates as Kubernetes resources that a controller keeps current. This guide explains the model, setup, and production safeguards. Automation handles issuance and renewal, but monitoring and access controls make it dependable.
How cert-manager models certificates as reconciled cluster resources
In the manual pattern, certificates are kept up to date outside Kubernetes. Someone runs certbot, copies the certificate files into Secrets, and writes cron jobs to renew them. With each new service, there is another chance to miss a step. Kubernetes does not close that gap itself. Its controllers and pods consume Secrets, but it has no built-in mechanism to keep their certificates fresh.
Cert-manager replaces that pattern with declared state. It is a CNCF-graduated Kubernetes add-on whose controller reconciles the certificate you requested with the certificate stored in the cluster. An Issuer represents a certificate authority within one namespace, while a ClusterIssuer can serve requests from any namespace. A Certificate declares the DNS names, issuer, lifetime, and destination Secret. A CertificateRequest is the one-time certificate signing request that cert-manager creates during issuance or renewal.
The controller obtains the signed certificate from the configured issuer and writes it, together with the private key, into a Secret. That is where its job ends. The ingress controller or application must consume that Secret. Because the model separates issuance from consumption, it supports public ACME authorities such as Let's Encrypt and ZeroSSL, private authorities such as HashiCorp Vault and CyberArk Certificate Manager, formerly Venafi, and self-signed CA chains.

Installing cert-manager and verifying the control plane is healthy
To put that model into practice, install cert-manager before creating issuer resources. Helm is the production default because it manages the chart and CRD lifecycle together. Use the official Jetstack OCI chart at oci://quay.io/jetstack/charts/cert-manager and a dedicated cert-manager namespace. Separating the controller from applications simplifies network policies and compliance scoping. The controller is infrastructure.
The Helm installation uses release name cert-manager, chart jetstack/cert-manager, and the options --namespace cert-manager --create-namespace --version v1.21.3 --set crds.enabled=true. The crds.enabled=true setting installs the resource definitions with the release so they are upgraded with cert-manager. CRDs can be installed separately with kubectl apply, but someone then has to keep their upgrades in step with cert-manager. Static manifests are another installation path. They make upgrades and RBAC configuration more brittle, so Helm remains the better default.
Before requesting a certificate, verify that the cert-manager, cert-manager-cainjector, and cert-manager-webhook pods are Ready. Do not skip the webhook readiness check. Creating an Issuer while the webhook is still initializing can produce “connection refused” errors during admission validation. Those errors can look like issuer configuration problems even though the certificate authority has not entered the picture.
Choosing between HTTP-01 and DNS-01 challenges before writing any issuer config

With the control plane healthy, choose how the certificate authority will verify domain control. This choice depends on network access and certificate names. HTTP-01 requires the domain to resolve to the cluster’s Ingress IP and port 80 to be publicly reachable from Let's Encrypt. Cert-manager creates a temporary Ingress rule and Pod to serve the challenge token. Let's Encrypt then asks for that token through the domain’s HTTP challenge path.
HTTP-01 works for public services that sit behind a standard Ingress controller. It cannot issue wildcard certificates, however. That restriction comes from the ACME protocol. A private cluster that cannot receive the validation request also cannot use this route successfully. Correct issuer syntax will not repair an unreachable challenge endpoint.
DNS-01 proves control by creating a TXT record in the domain’s DNS zone. The authority checks DNS. This supports private clusters, internal services, and wildcard names such as *.example.com. The trade-off is permission to change DNS records. Those credentials can prove control of names throughout their permitted zone, so their scope is part of the security design.
Configuring a ClusterIssuer for Let's Encrypt and always testing against staging first
Start with Let's Encrypt staging, regardless of the challenge type. Its certificates are deliberately untrusted by browsers, but its higher rate limits allow more testing to reveal configuration mistakes in staging. Production issues certificates that are publicly trusted and caps the number of duplicate certificates for each domain each week. Debugging against production can therefore mean waiting hours because of a configuration error. Staging exists to avoid that trap.
For multiple applications, a ClusterIssuer usually avoids needless duplication across namespaces. In its ACME configuration, set spec.acme.server to the staging endpoint and spec.acme.email to a real address for expiry warnings. The privateKeySecretRef names the Secret holding the ACME account private key in the cert-manager namespace. This is an account credential. If it is lost or corrupted, cert-manager cannot re-authenticate with the authority.
For an NGINX HTTP-01 configuration, set the solver’s http01.ingress.class to nginx. For Route 53 DNS-01, configure dns01.route53 with the region and hostedZoneID. Annotate cert-manager’s ServiceAccount for IRSA so it can assume an IAM role rather than relying on long-lived access keys in Secrets. The role needs route53:GetChange, zone-scoped route53:ChangeResourceRecordSets and route53:ListResourceRecordSets, plus route53:ListHostedZonesByName on *.
Check the issuer before creating any Certificate resources. Run kubectl get clusterissuer and wait for READY to show True. Then complete an issuance in staging before switching to the production issuer. Browsers are expected to reject the resulting staging certificate even when domain validation has passed.
Declaring a Certificate resource and wiring it to an Ingress or Gateway
An explicit Certificate makes the requested result visible. Its spec.secretName names the TLS Secret to create, spec.dnsNames contains the certificate names, and spec.issuerRef selects the issuer. The spec.duration and spec.renewBefore fields express lifetime and renewal timing. Put the Certificate in the same namespace as the Ingress or Service that will consume its Secret. This pattern suits wildcard certificates, non-Ingress consumers, and requests needing fine-grained control.
For a wildcard request, the names can include both *.example.com and example.com, using a DNS-01 issuer. The declaration is only the starting point. Run kubectl describe certificate <name> -n <namespace> to see its status and issuance events. New certificates are generally issued within minutes of resource creation. Those events show where the process stopped if issuance fails.
For a simple single-domain Ingress, annotations provide a shortcut. Add cert-manager.io/cluster-issuer with the value letsencrypt-prod, then add a spec.tls block containing the host and secretName. Cert-manager creates the Certificate implicitly and performs issuance through a CertificateRequest. The ingress controller watches the resulting Secret and reloads dynamically. This is convenient, but the explicit resource makes ownership and configuration easier to see.
With Gateway API, TLS configuration is on the Gateway’s listener. Routes such as HTTPRoute have no certificate information. Cert-manager watches annotated Gateways and uses HTTPS listeners with certificateRefs entries to create Certificates. The project sees Gateway API as its future, but it advises existing ingress-nginx users to move to another Ingress controller before they move to Gateway API.
How automatic renewal works and what to watch when it doesn't
Once issuance succeeds, the controller keeps reconciling the Certificate. By default, renewal starts two-thirds through its lifetime, so a standard 90-day Let's Encrypt certificate is renewed 30 days before it expires. A certificate approaching renewal triggers a new CertificateRequest. No cron job is needed for this loop. Its success still depends on the conditions that allowed the first issuance.
Those conditions can change while the application keeps working for now. A DNS change can stop an HTTP-01 domain from resolving to the Ingress IP, while a network policy can block the solver Pod. An ingress class mismatch can leave the temporary challenge endpoint unserved. DNS-01 can fail after an IAM role or API token is rotated or revoked without the corresponding configuration being updated. A deleted or corrupted ACME account Secret can stop authentication altogether.
When renewal stalls, start with kubectl get certificate -A to find Certificates that are not Ready. Follow with kubectl describe certificate <name> -n <namespace> for events, then kubectl describe certificaterequest <name> for issuance and challenge errors. If those do not explain the failure, follow the request through controller diagnostics using kubectl logs -n cert-manager deployment/cert-manager.
Cert-manager provides Prometheus metrics and Kubernetes events for renewal status. Set an alert for certificates approaching expiry so a stalled loop reaches a person. A successful first issuance is not a permanent health check.
Security and RBAC decisions that most teams get wrong after setup
A working certificate does not prove a secure setup. Anyone with get or list access to Secrets in the namespace can read the key. Use RBAC to limit who can access Secrets, including kubernetes.io/tls Secrets. Never store private keys in Git.
Certificate creation is also a trust privilege. A team allowed to create Certificates and reference a shared internal-CA ClusterIssuer can mint certificates that internal clients trust. Control that permission with Certificate RBAC or an admission policy. Keep internal and external authorities in separate issuer objects because they have different trust boundaries. DNS challenge credentials also need tight controls on where they are stored and permission to change only the zone being validated within the DNS account.
Security advisories show why controller permissions deserve attention. CVE-2026-62290, rated CVSS 7.3 High, affects versions 1.18.0–1.19.5 and 1.20.0–1.20.2. The cert-manager-edit ClusterRole let namespace users create ACME Challenge resources directly without admission validation. Attacker-controlled Challenge.spec.solver values referencing a ClusterIssuer could bypass DNS-01 solver selectors and disclose DNS provider API credentials. The fixes are 1.19.6 and 1.20.3, and the official advisory documents no additional 1.21.x LTS tracking.
CVE-2024-36537, rated CVSS 7.2 High, involved insecure permissions in cert-manager v1.14.4 that allowed sensitive-data access and privilege escalation through the service account’s token. Treat cert-manager as a privileged cluster-wide component by pinning its version, tracking releases, and upgrading with other critical infrastructure. Red Hat’s OpenShift cert-manager Operator maintains its own patch cadence on top of upstream. Distribution packaging does not remove the need to track patches.
For workloads with strict compliance needs, use short-lived certificates where possible and ECDSA keys for better performance and smaller certificates. The CSI driver and SPIFFE CSI driver patterns create private keys as needed before applications start and keep them on the node without storing them in Secrets. These patterns are worth evaluating when Secret storage conflicts with the workload’s threat model.
What cert-manager does not cover and how production teams fill the gap
Cert-manager’s scope ends with Kubernetes and OpenShift. It does not manage certificates for VMs, network devices, external cloud load balancers, or on-premises servers outside a cluster. It also has no dashboard or UI, so management requires Kubernetes expertise. That is a deliberate design boundary. Across many certificates and clusters, a monitoring layer is also needed to expose certificates that fail to sync to downstream systems.
Production teams divide responsibility around those boundaries. On AWS, AWS Certificate Manager handles load balancer endpoints with native ALB/NLB integration and automatic renewal, while cert-manager handles Kubernetes Ingress and in-cluster workloads. The useful distinction is where the certificate is consumed.
Teams that use GitOps apply declared state across that wider set of systems. Terraform manages cloud-native certificates, cert-manager manages Kubernetes certificates, and External Secrets Operator brings secret material from Vault or cloud KMS into the cluster without committing it to Git. That creates a pipeline that can be audited, with certificates handled by more than one controller. This pipeline reduces manual handling, with clear responsibility for the parts outside cert-manager’s reach.
This article is sponsored by Porter.