Skip to content

2026-10-29: Demo shop certificate not issued, its hostnames resolve to hetzner-mgmt

Kind: reference (incident report)

Severity: warning · Status: open · Resolved by: handed to the owner by the operator agent (#2174) · Duration: not resolved (fault from 18:38:14, alert from 18:49:03 UTC) · Taskbase tasks: #2173, #2176

Summary

The demo shop's Certificate gateway-system/shop-demo-tls on webshop was created when PR #1045 (#2170) merged, and it was never issued. Its three hostnames have no DNS records yet, so the wildcard *.skatzi.com sends Let's Encrypt's HTTP-01 challenge to hetzner-mgmt's gateway, which answers 404. The records are in the owner's open PR #1043, which the owner applies by hand (#2174). The alert was raised as critical CertificateExpiringSoon ("expires in -20755d"). That was an alert rule bug: a never-issued Certificate reports an expiry of 0. PR #1049 fixed the rule, and CertificateNotReady covers this case. It fired an hour after the fault, as expected (#2176), and stays firing until #2174 is done.

Impact

  • Services: the demo shop (webshop-demo.skatzi.com, www., admin.) has no TLS certificate. The listeners shop-demo-https, shop-demo-www-https and shop-demo-admin-https on shared-gateway are Accepted=False (InvalidCertificateRef). The shop's HelmRelease is not running either, for an unrelated reason (#2175), so nothing was being served on these hostnames.
  • Users: none. The demo shop is new and had not served traffic.
  • Data: none.
  • Duration: not resolved. The fault began at 18:38:14 (the Certificate's first issuance) and the alert fired at 18:49:03.

Timeline

All times UTC.

Time Event Source
18:15 The owner opens PR #1043 with the DNS records for the demo shop (and the eloro.dk zone) PR #1043
18:35:44 PR #1045 (#2170) merges: shop listeners and Certificate shop-demo-tls PR #1045
18:38:14 cert-manager starts issuing shop-demo-tls; three HTTP-01 Challenges are presented Certificate events
18:49:03 Detected: CertificateExpiringSoon (critical) fires for gateway-system/shop-demo-tls Alertmanager, #2173
18:50 The operator agent confirms the alert is active and not silenced Alertmanager API
18:51–18:53 Cause found: Challenges get 404; the gateway answers 200 on its own address; DNS resolves to 116.202.177.24 kubectl, curl, getent
18:54 Handed to the owner: merge and apply #1043 (#2174). Chart label failure recorded (#2175) Taskbase
19:39:03 CertificateNotReady (warning) fires for gateway-system/shop-demo-tls, one hour after the fault (#2176) Alertmanager
19:40 The operator agent re-checks: alert active and not silenced, same cause, #1043 still open and unapplied Alertmanager API, kubectl, getent

Root cause

HTTP-01 on webshop needs each shop hostname's DNS to point at webshop's floating IP (167.233.187.133), as the webshop cluster README says. In the skatzi.com zone (terraform/environments/hetzner-mgmt-cluster/3-ekstra/main.tf), *.skatzi.com points at hetzner-mgmt (116.202.177.24). Until explicit records exist, webshop-demo.skatzi.com, www. and admin. resolve there, and mgmt's gateway has no solver route for the token. The records are in PR #1043. #2170 listed that PR as the owner's, but PR #1045 merged before #1043 was applied, so cert-manager tried to issue the certificate before DNS existed.

The alert's severity and text came from a rule gap. cert-manager exports certmanager_certificate_expiration_timestamp_seconds as 0 for a Certificate without a certificate. The critical rule expiration - time() < 3 * 86400 is then true, so the alert reports "-20755d". The warning rule's >= 3 * 86400 bound already excluded 0.

What the agent did

Following the CertificateExpiringSoon runbook, read-only checks first:

  1. kubectl -n monitoring port-forward svc/alertmanager-operated 19093:9093 and curl -sG http://localhost:19093/api/v2/alerts --data-urlencode 'filter=alertname="CertificateExpiringSoon"': one alert, ee9c3d90bafab5c9, state: active, silencedBy: [].
  2. kubectl -n gateway-system get certificate,certificaterequest,order,challenge and describe certificate shop-demo-tls: Ready=False, DoesNotExist ("Issuing certificate as Secret does not exist"). Order pending, three Challenges pending.
  3. kubectl -n gateway-system get challenge -o custom-columns=...: all three show Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200', presented: true.
  4. kubectl get clusterissuer letsencrypt-prod: Ready, with the HTTP-01 gatewayHTTPRoute solver on shared-gateway. The solver HTTPRoutes are Accepted=True, ResolvedRefs=True.
  5. curl -H "Host: www.webshop-demo.skatzi.com" http://167.233.187.133/.well-known/acme-challenge/<token> returned 200. The same URL by hostname returned 404.
  6. getent ahostsv4 for the three hostnames: 116.202.177.24, which is hetzner-mgmt's cilium-gateway-shared-gateway. A random *.skatzi.com name resolves to the same address.
  7. Read PR #1043: it adds hcloud_zone_rrset.webshop_demo for the three names on 167.233.187.133. It is open and unmerged; 3-ekstra has a local state file and no CI apply.
  8. flux get kustomizations -A --status-selector ready=false and flux get helmreleases -A: only shop-demo is not Ready (#2175, unrelated). cert-manager v1.21.3 is Ready.
  9. PR #1049: the critical CertificateExpiringSoon rule requires an expiry > 0, a promtool test for a never-issued Certificate is added, and the two certificate runbooks are updated. promtool test rules fails on the old rule with an extra critical alert for shop-demo-tls, and passes with the fix.
  10. Taskbase #2174 (owner: merge and apply #1043) and #2175 (owner: pass the chart label failure on to eloro/webshop-platform).

No write to the cluster: the cluster was healthy for this alert, and the fix is DNS.

For CertificateNotReady (#2176), by the CertificateNotReady runbook, read-only:

  1. kubectl -n monitoring port-forward svc/alertmanager-operated 9093 and curl -sG http://localhost:9093/api/v2/alerts --data-urlencode 'filter=alertname="CertificateNotReady"': one alert for gateway-system/shop-demo-tls, state: active, silencedBy: [], since 19:39:03. No active silences.
  2. describe certificate shop-demo-tls: still Ready=False, DoesNotExist. CertificateRequest shop-demo-tls-1 not Ready, Order pending, the three Challenges pending with wrong status code '404', expected '200'.
  3. curl -H "Host: www.webshop-demo.skatzi.com" http://167.233.187.133/.well-known/acme-challenge/<token> returned 200; by hostname 404. getent ahostsv4 for the three hostnames: still 116.202.177.24, which is hetzner-mgmt's shared-gateway address.
  4. PR #1043: still open, unmerged, mergeable; its hcloud_zone_rrset.webshop_demo still points the three names at 167.233.187.133.
  5. flux get kustomizations -A --status-selector ready=false: only shop-demo (#2175). The listeners shop-demo-https, shop-demo-www-https and shop-demo-admin-https are ResolvedRefs=False (InvalidCertificateRef), Programmed=False.

No write to the cluster here either. The fix is still #2174.

Resolution and verification

Not resolved yet. Done when kubectl --context webshop -n gateway-system get certificate shop-demo-tls shows READY True and the three shop-demo-*-https listeners are Programmed=True, after #1043 is applied (#2174). PR #1049 merged and the false critical alert resolved: at 19:41 Alertmanager had no CertificateExpiringSoon alert. CertificateNotReady (#2176) now reports the unissued certificate.

Follow-ups

  • 2174: the owner merges and applies PR #1043 (DNS records for the demo shop), then checks the certificate.

  • 2175: the demo HelmRelease shop fails on the label helm.sh/chart: webshop-0.1.0+72eabb78c16d. The fix is in eloro/webshop-platform.

References

Open questions

  • Let's Encrypt keeps a pending authorization for 7 days. If #1043 is applied later than that, the Order fails, and cmctl renew -n gateway-system shop-demo-tls starts a new one.