Skip to content

CertificateExpiringSoon

Severity: warning when the certificate expires in under 14 days, critical under 3 days. cert-manager renews 30 days before expiry, so this alert means renewal has failed for at least two weeks. Once the certificate expires, HTTPS for its hostnames fails for every user. A Certificate that was never issued reports an expiry of 0 and does not fire this alert; CertificateNotReady covers it.

Labels: namespace, name (the Certificate), issuer_name. Most public hostnames use the wildcard certificate of the shared gateway in gateway-system.

Read-only checks

# The Certificate, its conditions and the renewal time cert-manager planned
kubectl --context <context> -n <namespace> describe certificate <name> | sed -n '/Status:/,$p'

# The renewal attempt: CertificateRequest, Order and Challenge of this Certificate
kubectl --context <context> -n <namespace> get certificaterequests,orders,challenges
kubectl --context <context> -n <namespace> describe challenges

# The issuer, and cert-manager's own view
kubectl --context <context> get clusterissuers
kubectl --context <context> -n cert-manager logs deploy/cert-manager --since=1h | grep -i <name>

# Is cert-manager itself healthy?
flux --context <context> get helmreleases -A | grep cert-manager

The usual causes are a failing ACME challenge (the HTTP-01 solver route on shared-gateway does not answer, or DNS points elsewhere), Let's Encrypt rate limits, or cert-manager not running. The same failure usually also shows as CertificateNotReady.

Roll forward

Fix the cause in Git (issuer, gateway route, cert-manager release) in a pull request. Then trigger a renewal; it is safe while the old certificate is still valid:

cmctl renew -n <namespace> <name>

Without cmctl, cert-manager retries a failed issuance on its own, with a back-off that grows to hours.

If cert-manager itself is stuck on a failed upgrade, follow the ops runbook's triage order; never uninstall cert-manager (rules of engagement, rule 6).

Roll back

If renewal broke with a new cert-manager version, revert the version bump in a pull request, as in the generic Flux freeze roll-back, after the CRD checks of the pre-flight: cert-manager templates its CRDs.