OpenShift - List Pod Disruption Budgets

by
Jeremy Canfield |
Updated: March 20 2025
| OpenShift articles
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command
When nodes are down, perhaps for maintenance or due to some unexpected issue, the pods running on the nodes are killed via SIGKILL and scheduled to run on another node. With Pod Disruption Budgets, the eviction and termination of a pod from a node is more graceful.
- Gracefully terminate any connections to the pod
- Send SIGTERM to the pods containers so that the containers can gracefully terminate and shut down
- If the containers in the pod does not gracefully terminate and shut down after a period of time, SIGKILL will be sent to the containers to kill the containers, forcing them to shut down
The oc get PodDisruptionBudgets command can be used to list Pod Distribution Budgets in the currently selected namespace, or using the --namespace option to list the Pod Disruption Budgets in a particular namespace.
~]$ oc get PodDisruptionBudgets --namespace my-namespace
NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
my-pod-disruption-budget 1 N/A 0 26s
Or the -A or --all-namespaces command can be used to list the Pod Distribution Budgets in all namespaces.
~]$ oc get PodDisruptionBudgets --all-namespaces
NAMESPACE NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
openshift-apiserver openshift-apiserver-pdb N/A 1 1 300d
openshift-cluster-storage-operator csi-snapshot-controller-pdb N/A 1 1 300d
openshift-cluster-storage-operator csi-snapshot-webhook-pdb N/A 1 1 300d
openshift-etcd etcd-quorum-guard N/A 1 1 300d
openshift-image-registry image-registry 1 N/A 2 300d
openshift-ingress router-default N/A 50% 2 2y229d
openshift-ingress router-external-router N/A 50% 1 2y228d
openshift-ingress router-internal-router N/A 50% 1 2y228d
openshift-kube-apiserver kube-apiserver-guard-pdb 2 N/A 1 224d
openshift-kube-controller-manager kube-controller-manager-guard-pdb 2 N/A 1 224d
openshift-kube-scheduler openshift-kube-scheduler-guard-pdb 2 N/A 1 224d
openshift-monitoring alertmanager-main N/A 1 1 224d
openshift-monitoring prometheus-adapter 1 N/A 1 300d
openshift-monitoring prometheus-k8s 1 N/A 1 224d
openshift-monitoring thanos-querier-pdb 1 N/A 1 300d
openshift-oauth-apiserver oauth-apiserver-pdb N/A 1 1 300d
openshift-operator-lifecycle-manager packageserver-pdb N/A 1 1 224d
Did you find this article helpful?
If so, consider buying me a coffee over at