Difference between revisions of "Kubernetes PodDisruptionBudget (PDB)"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 20: Line 20:
 
  55m        Normal    NoPods                            poddisruptionbudget/your_text                    No matching pods found
 
  55m        Normal    NoPods                            poddisruptionbudget/your_text                    No matching pods found
  
 
+
== Test ==
 
  [[kubectl drain]] ip-10-0-3-48.us-east-2.compute.internal [[--ignore-daemonsets]]
 
  [[kubectl drain]] ip-10-0-3-48.us-east-2.compute.internal [[--ignore-daemonsets]]
 
  error when evicting pods/"your-pod-name" (will retry after 5s): [[Cannot evict pod as it would violate the pod's disruption budget]]
 
  error when evicting pods/"your-pod-name" (will retry after 5s): [[Cannot evict pod as it would violate the pod's disruption budget]]

Revision as of 12:33, 19 January 2023

Commands


kubectl api-resources | grep -i pdb
poddisruptionbudgets              pdb          policy/v1                              true         PodDisruptionBudget
33m         Warning   CalculateExpectedPodCountFailed   poddisruptionbudget/xxxx-pdb                     Failed to calculate the number of expected pods: statefulsets.apps does not implement the scale subresource


kind: PodDisruptionBudget


55m         Normal    NoPods                            poddisruptionbudget/your_text                     No matching pods found

Test

kubectl drain ip-10-0-3-48.us-east-2.compute.internal --ignore-daemonsets
error when evicting pods/"your-pod-name" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget

Examples

 apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
 name: zk-pdb
spec:
 minAvailable: 2
 selector:
   matchLabels:
     app: zookeeper

Related

See also

Advertising: