Skip to content

CertificateNotReady

Severity: warning. Fires when a cert-manager Certificate has not been Ready for one hour: it was never issued, or its last issuance or renewal failed. The workloads keep the last valid certificate until it expires; a new hostname has none.

Labels: namespace, name (the Certificate).

Read-only checks

# Why it is not Ready: the Ready and Issuing conditions name the reason
kubectl --context <context> -n <namespace> describe certificate <name> | sed -n '/Status:/,$p'

# The issuance chain
kubectl --context <context> -n <namespace> get certificaterequests,orders,challenges
kubectl --context <context> -n <namespace> describe certificaterequests
kubectl --context <context> -n <namespace> describe challenges

# Does the secret exist, and is the issuer Ready?
kubectl --context <context> -n <namespace> get secret "$(kubectl --context <context> -n <namespace> get certificate <name> -o jsonpath='{.spec.secretName}')"
kubectl --context <context> get clusterissuers

# An HTTP-01 challenge stuck on "wrong status code '404'": does the gateway answer it, and does DNS reach that gateway?
kubectl --context <context> -n <namespace> get challenges -o custom-columns=DOMAIN:.spec.dnsName,TOKEN:.spec.token,REASON:.status.reason
kubectl --context <context> -n gateway-system get gateway shared-gateway -o jsonpath='{.status.addresses[*].value}'
curl -s -o /dev/null -w '%{http_code}\n' -H 'Host: <domain>' http://<gateway address>/.well-known/acme-challenge/<token>
getent ahostsv4 <domain>

Typical reasons: an issuer that does not exist or is not Ready, a hostname whose DNS does not reach the gateway, an HTTP-01 challenge that the gateway does not route, or ACME rate limits.

If the gateway answers 200 on its own address but getent gives another address, the fix is the DNS record, not the cluster. On webshop a hostname under skatzi.com needs its own A record on webshop's floating IP: without one, the wildcard *.skatzi.com sends it to hetzner-mgmt, whose gateway answers the challenge with 404. The skatzi.com records are Terraform in terraform/environments/hetzner-mgmt-cluster/3-ekstra, which the owner applies.

Roll forward

Fix the Certificate, issuer or route in Git in a pull request. cert-manager retries with back-off; once the cause is fixed, cmctl renew -n <namespace> <name> retries at once. For an expiring certificate also see CertificateExpiringSoon.

Roll back

If the Certificate broke with a change in Git (a new hostname, a changed issuer), revert that pull request. If it broke with a cert-manager upgrade, see the roll-back of CertificateExpiringSoon.