More Info:
Advisory: define a PodDisruptionBudget for each multi-replica Deployment so node drains and rollouts keep a minimum number of pods available.Risk Level
InformationalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify multi-replica Deployments and their labels (run on any machine with kubectl access)
-
Decide the minimum available pods for each Deployment (planning step)
For each multi-replica Deployment, choose either:minAvailable: minimum number of pods that must stay available during disruptions, ormaxUnavailable: maximum number or percentage of pods that can be disrupted at once.
Ensure the value makes sense for the workload’s availability/SLO requirements.
-
Create a PodDisruptionBudget manifest that matches the pod labels (run on any machine with kubectl access)
Create a file such aspdb-<deployment-name>.yamlwith matchLabels exactly matching the pod template labels from step 1 (do not usematchExpressions, as the audit ignores them). Example structure: -
Apply the PodDisruptionBudget to the cluster (run on any machine with kubectl access)
-
Confirm that each PDB selector correctly matches pods from its Deployment (run on any machine with kubectl access)
-
Verify compliance using the benchmark audit logic (run on any machine with kubectl access)
Ensure every multi-replica Deployment reports
is_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:Apply it:Repeat as needed so each Deployment with
- Identify multi‑replica Deployments and their labels
- Create a PodDisruptionBudget manifest matching the Deployment’s pod labels
.spec.replicas > 1 has at least one PDB whose spec.selector.matchLabels is a subset of the pod template labels for that Deployment.- Verification
Automation
Automation

