Troubleshooting
Common issues and how to resolve them.
PDBs not being created
-
Check the operator logs:
kubectl logs -n pdb-operator-system deployment/pdb-operator-controller-manager -
Verify the policy matches your deployment:
kubectl get pdbpolicy -A -o wide
kubectl get pdb -A -l pdboperator.io/managed-by=pdb-operator -
Check policy status for matching workloads:
kubectl describe pdbpolicy <name> -
Ensure the deployment has 2+ replicas. PDBs are not created for single-replica deployments.
Webhook errors
-
Verify cert-manager is running and the certificate is ready:
kubectl get certificate -n pdb-operator-system -
Check webhook configuration:
kubectl get validatingwebhookconfiguration,mutatingwebhookconfiguration | grep pdb -
If cert-manager is not installed, the operator falls back to running without webhooks.
Policy conflicts
When multiple policies match a deployment, the operator uses priority-based resolution. Check which policy was applied:
kubectl get deployment <name> -o jsonpath='{.metadata.annotations}'
kubectl get events --field-selector involvedObject.name=<name>
Higher priority (larger number) wins. If priorities are equal, the operator uses deterministic tie-breaking (alphabetical by namespace/name).
Metrics not showing
-
Verify the metrics service is running:
kubectl get svc -n pdb-operator-system | grep metrics -
Check ServiceMonitor is picked up by Prometheus:
kubectl get servicemonitor -n pdb-operator-system -
Verify Prometheus targets include the pdb-operator endpoint.
Getting Help
If the issue persists, open a GitHub Issue with:
- Operator logs
- PDBPolicy YAML
- Deployment YAML
- Kubernetes version
- PDB Operator version