Kubernetes check

Multi-replica Deployment has no matching PodDisruptionBudget

K8S-REL-004MediumReliability

Trigger condition

A Deployment with a desired replica count (spec.replicas) of 2 or more has no policy/v1 PodDisruptionBudget, in the same namespace, whose selector matches its current Pod template labels (spec.template.metadata.labels). Evaluated from the current template alone, even when the Deployment has no live Pods at all. A null or omitted PDB selector matches no Pods; an explicit {} selector matches every Pod in that namespace. Older ReplicaSets, labels added only at admission time, and actual Eviction API/runtime behavior are all outside this check's scope.

Evidence

States the Deployment's name, its desired replica count, and the namespace in which no PodDisruptionBudget selector matched its current Pod template labels.

Impact

Voluntary evictions through the Eviction API, such as during a normal node drain, can reduce serving capacity. A matching PodDisruptionBudget can limit simultaneous voluntary disruptions. Direct Pod deletion bypasses the budget, and involuntary failures can still occur. The Deployment's rollout strategy governs rolling updates.

Recommendation

Create a policy/v1 PodDisruptionBudget with a selector scoped to this workload's own Pod template labels, and choose minAvailable or maxUnavailable based on this workload's own availability needs.

Important limitations

This check only evaluates whether some PodDisruptionBudget's selector matches the Deployment's current Pod template labels -- it never validates a budget's own minAvailable/maxUnavailable threshold, overlapping selectors across multiple PDBs, or whether the Eviction API would actually honor it at runtime. It also never inspects an older ReplicaSet's own template, or labels a mutating webhook adds only at admission time. If PodDisruptionBudget data could not be collected at all (e.g. a 403), this check is skipped entirely for that audit run rather than reporting every multi-replica Deployment as unprotected.

← Back to the check catalogue