How would you design a certificate rotation strategy that achieves zero downtime, avoiding the risk of an expired certificate causing an outage?
Short answer
A robust rotation strategy monitors certificate expiration well in advance (alerting at 30/14/7 days remaining via automated monitoring, not manual calendar reminders), automates renewal and deployment (via a tool like LettuceEncrypt, cert-manager in Kubernetes, or a cloud…
Advertisement
AModel answer
A robust rotation strategy monitors certificate expiration well in advance (alerting at 30/14/7 days remaining via automated monitoring, not manual calendar reminders), automates renewal and deployment (via a tool like LettuceEncrypt, cert-manager in Kubernetes, or a cloud provider's managed certificate service) rather than relying on manual processes prone to human error or forgotten renewals, and validates the new certificate is actually being served correctly (via an automated post-deployment check) before considering the rotation complete -- treating certificate expiration as a preventable, fully automatable operational failure mode rather than an occasional fire drill.
# Kubernetes cert-manager example -- fully automated certificate lifecycle
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: api-tls
spec:
secretName: api-tls-secret
duration: 2160h # 90 days
renewBefore: 360h # renew 15 days before expiry
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuerReal-world example
A postmortem after a production outage caused by an expired certificate (missed due to a manual renewal process depending on one engineer's calendar reminder) leads the team to adopt cert-manager in their Kubernetes cluster, fully automating certificate issuance, renewal, and rotation, eliminating that entire class of human-error-driven outage going forward.
Likely follow-ups
- What automated monitoring/alerting should exist as a safety net even with automated rotation in place?
- How do you test a certificate rotation process safely before relying on it in production?
Related topics