New to Kestra?
Use blueprints to kickstart your first workflows.
Audits Knative Serving custom resources to detect failed revisions, degraded conditions, and scaling bottlenecks in Kubernetes clusters.
Enterprise Knative Serving deployments automatically create immutable revisions for every application configuration change. In fast-paced microservice environments, broken deployments, bad environment variables, missing secrets, and container pull failures can leave broken revisions in degraded states, silently breaking traffic splitting and serverless scaling. This sentinel continuously inspects Knative Serving revisions across target Kubernetes namespaces, flags unready conditions and failure reasons, and alerts platform engineering teams before customer-facing serverless routes fail.
0 * * * *) or runs on-demand via manual execution or API webhooks.revisions.serving.knative.dev resources in the specified namespace..status.conditions on each revision, checking Ready, ConfigurationsReady, and RoutesReady states.ContainerMissing, ImagePullBackOff, ExitCode1, or configuration deadlocks, and extracts exact remediation commands.io.kestra.plugin.core.flow.If condition checks if unready revisions exceed max_unready_revisions.SlackIncomingWebhook with revision names, parent services, and debugging commands.flowchart TD
A[hourly_knative_audit Schedule Trigger] --> B[scan_knative_revisions Python Script]
B --> C[check_unready_revisions Flowable If]
C -- Unready > Threshold --> D[notify_slack_knative_alerts Webhook]
C -- Healthy --> E[log_knative_health_status Log]
D --> E
E --> F[export_knative_manifest Return]
| Name | Type | Default | Description |
|---|---|---|---|
kubernetes_api_server |
STRING |
https://kubernetes.default.svc |
Base URL for the target Kubernetes cluster API server. |
namespace_filter |
STRING |
default |
Kubernetes namespace containing Knative Serving services to audit. |
alert_on_revision_unhealthy |
BOOL |
true |
Whether to dispatch alerts when unhealthy revisions or failed deployments are detected. |
max_unready_revisions |
INT |
1 |
Maximum count of degraded or unready revisions allowed before triggering critical alerts. |
{{ outputs.scan_knative_revisions.vars.total_revisions_scanned }}: Total count of evaluated Knative revisions in the namespace.{{ outputs.scan_knative_revisions.vars.unhealthy_revisions_count }}: Number of revisions found in non-Ready states.{{ outputs.scan_knative_revisions.vars.health_ratio_percentage }}: Percentage of operational revisions in the namespace.{{ outputs.scan_knative_revisions.vars.unhealthy_revisions_details }}: Serialized JSON array containing failure reasons and kubectl remediation commands.{{ outputs.export_knative_manifest.value }}: Structured dictionary containing the consolidated cluster health summary.get and list resources under the serving.knative.dev API group.KUBERNETES_SERVICE_ACCOUNT_TOKEN: Bearer token for authenticating to the Kubernetes API server.SLACK_WEBHOOK_URL: Slack Incoming Webhook endpoint URL for alerting.KUBERNETES_SERVICE_ACCOUNT_TOKEN.SLACK_WEBHOOK_URL.company.devops namespace.list and get access on revisions in the serving.knative.dev API group, otherwise the script receives HTTP 403 Forbidden.Ready: True condition. Do not confuse 0 active pods with an unhealthy revision state; this flow inspects condition status, not current pod count.io.kestra.plugin.core.flow.ForEach loop to audit all namespaces across an entire Kubernetes cluster.