New to Kestra?
Use blueprints to kickstart your first workflows.
Probes Kubernetes Ingress domain endpoints over TLS, measuring certificate validity and alerting SRE teams on Slack before expiration.
In cloud-native Kubernetes environments, Ingress controllers (such as Ingress-NGINX, Traefik, or AWS Load Balancer Controller) terminate incoming SSL/TLS connections for customer-facing services. While automated tools like cert-manager and Let's Encrypt handle automated certificate renewals, ACME HTTP-01 challenge failures, rate limits, or expired DNS API credentials frequently stall renewal pipelines.
When an ingress certificate expires, web browsers immediately block user traffic with severe security warnings (ERR_CERT_DATE_INVALID), causing catastrophic availability outages for production web applications and REST APIs.
This blueprint provides an independent external observability guard that establishes live TLS socket handshakes with your public Ingress hostnames daily. It verifies peer x509 certificates, calculates remaining days until expiration, and alerts Site Reliability Engineering teams via Slack whenever a certificate enters its critical renewal window (default: 21 days).
daily_cert_audit trigger (io.kestra.plugin.core.trigger.Schedule) executes every morning at 08:00 UTC.probe_tls_certificates task (io.kestra.plugin.scripts.python.Script) establishes socket connections to each configured host over port 443, extracts notAfter metadata, and generates cert_audit_report.json.evaluate_cert_expiry flowable task (io.kestra.plugin.core.flow.If) branches based on whether any certificates breached the expiration threshold.notify_slack_sre_team (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) delivers an actionable triage card detailing the host, days remaining, and cert-manager remediation advice.log_valid_certs_status records nominal status in execution logs.export_cert_manifest task records execution state for compliance tracking.flowchart TD
A[Schedule: Daily 08:00 UTC] --> B[probe_tls_certificates: Python TLS Handshake]
B --> C{Certificates Expiring?}
C -- Yes --> D[send_slack_expiry_alert: Slack Webhook]
C -- No --> E[log_valid_certs_status: Log]
D --> F[export_cert_manifest: Return JSON]
E --> F
Setting up standalone cert-monitoring agents or Prometheus blackbox exporters requires configuring scrape jobs, Alertmanager routes, and dashboard panels. Kestra provides a lightweight, declarative workflow that runs the probe, scores expiration dates, and notifies Slack directly without external monitoring overhead.
| Name | Type | Default | Description |
|---|---|---|---|
days_before_expiry_warning |
INT | 21 |
Days before expiration to raise an operational alert. |
ingress_hosts_list |
STRING | api.company.com,app.company.com |
Comma-separated list of hostnames to probe. |
slack_channel |
STRING | #sre-alerts |
Slack channel destination for alerts. |
{{ outputs.probe_tls_certificates.vars.has_expiring }}: Boolean flag indicating if expiring certs were found.{{ outputs.probe_tls_certificates.vars.expiring_count }}: Number of endpoints breaching threshold.{{ outputs.probe_tls_certificates.vars.top_host }}: Hostname with the earliest expiration date.{{ outputs.probe_tls_certificates.outputFiles['cert_audit_report.json'] }}: Complete JSON diagnostic report.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL.SLACK_WEBHOOK_URL in your Kestra namespace secrets.ingress_hosts_list.server_hostname during socket wrapping; ensure hostnames match the Server Name Indication (SNI) configured on the ingress controller.io.kestra.plugin.kubernetes.pods.Logs to inspect cert-manager pod logs when certificates fail to renew automatically.