Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Kubernetes PodDisruptionBudget Zero Allowed Disruptions Lock Sentinel

Audits Kubernetes PodDisruptionBudgets to detect zero-disruption locks that stall cluster upgrades and node drains.

Categories
CloudInfrastructure

How it works

This workflow queries all PodDisruptionBudget (PDB) objects across all cluster namespaces using kubectl. It inspects .status.disruptionsAllowed alongside .status.expectedPods. Any PDB where disruptionsAllowed is 0 while workloads exist will deadlock Kubernetes node draining, preventing cluster maintenance or autoscaling. When violations exceed the threshold, an automated Slack alert is dispatched.

What you get

  • Continuous proactive detection of deadlocked PodDisruptionBudgets before maintenance windows.
  • Rapid visibility into unhealthy microservices preventing cluster node drains.
  • Contextual alerting detailing current vs. desired healthy pod counts.

Who it's for

  • SREs and Infrastructure Engineers responsible for Kubernetes version upgrades and node lifecycle management.
  • Platform teams troubleshooting stuck cluster autoscaler downscales or maintenance drain timeouts.

Why orchestrate this with Kestra

  • Proactive Scheduling: Detect disruption deadlocks days before scheduled maintenance instead of encountering stuck drains during a production upgrade window.
  • Multi-Cluster Orchestration: Run this identical workflow across dozens of clusters using dynamic loop iterations.
  • Actionable Routing: Route alerts directly to service owners via Slack, Microsoft Teams, or Webhooks.

Prerequisites

  • Cluster RBAC permissions allowing get and list on poddisruptionbudgets.policy.
  • Secret SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import this blueprint into your Kestra workspace.
  2. Set up the SLACK_WEBHOOK secret.
  3. Trigger the workflow manually to audit existing PDB definitions across your cluster.

How to extend

  • Chain with automated pod restart checks or deployment scaling verifications.
  • Send metrics to Datadog or Prometheus via webhook tasks.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.