Commands icon
If icon
SlackIncomingWebhook icon
Schedule icon

Kubernetes EndpointSlice Ready Endpoints Depletion and Routing Sentinel

Audits Kubernetes discovery.k8s.io EndpointSlices across all namespaces to detect zero-ready backend routing blackholes.

Categories
CloudInfrastructure

How it works

This workflow connects to the target Kubernetes cluster using kubectl to inspect all discovery.k8s.io/v1 EndpointSlice resources cluster-wide. It inspects .endpoints[].conditions.ready for every slice. When deployments experience crash loops, failed liveness/readiness probes, or evicted pods, the corresponding EndpointSlice loses all ready endpoints. When empty slices exceed configured limits, a real-time incident alert is dispatched to Slack.

What you get

  • Real-time detection of backend microservice routing blackholes.
  • Eliminates silent internal RPC connection refused failures.
  • Actionable inventory of affected service names, namespaces, and address types (IPv4/IPv6).

Who it's for

  • SREs and Platform Engineers supporting Kubernetes service discovery and ingress routing.
  • Backend developers diagnosing intermittent HTTP 503 errors during pod redeployments.

Why orchestrate this with Kestra

  • Native Scheduling: Run regular, automated cluster network audits without running dedicated daemons.
  • Multi-Tenant Visibility: Audits all namespaces simultaneously in a single lightweight execution.
  • Flexible Alert Routing: Route failure diagnostics directly to responsible service teams via Slack or Webhooks.

Prerequisites

  • Cluster RBAC permissions allowing get and list on endpointslices.discovery.k8s.io.
  • Secret SLACK_WEBHOOK configured in Kestra.

Quick start

  1. Import this blueprint into your Kestra workspace.
  2. Configure the SLACK_WEBHOOK secret.
  3. Run the workflow to inspect current EndpointSlice readiness across your cluster.

How to extend

  • Add an automated task to describe unready pods belonging to the affected service.
  • Trigger an automated rollout restart if pods are hung in terminating states.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.