Difference between revisions of "Kubernetes PodDisruptionBudget (PDB)"
Jump to navigation
Jump to search
(22 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | * | + | * https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets |
− | + | ** [[1.4]] Alpha, [[K8s v1.21]] April 2021 GA, [[Eviction subresource]] 1.22 | |
+ | * https://github.com/kubernetes/enhancements/issues/85 | ||
+ | * https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/85-Graduate-PDB-to-Stable | ||
* https://kubernetes.io/docs/tasks/run-application/configure-pdb/ | * https://kubernetes.io/docs/tasks/run-application/configure-pdb/ | ||
− | + | == Commands == | |
+ | * <code>[[kubectl get pdb]]</code> | ||
Line 16: | Line 19: | ||
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]] | ||
+ | error when evicting pods/"your-pod-name" (will retry after 5s): [[Cannot evict pod as it would violate the pod's disruption budget]] | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | {{PDB example}} | ||
== Related == | == Related == | ||
Line 23: | Line 34: | ||
* [[Karpenter]] | * [[Karpenter]] | ||
* <code>[[spec.replicas]]</code> | * <code>[[spec.replicas]]</code> | ||
+ | * [[Eviction API]] | ||
+ | * 1.21 [[Graceful node shutdown]] | ||
+ | * <code>[[kubectl drain]]</code> | ||
+ | * <code>[[kubectl drain]] your-node-name --ignore-daemonsets</code> | ||
+ | * [[TopologySpreadConstraints]] | ||
+ | * <code>[[ttlSecondsUntilExpired]]</code> | ||
+ | * <code>[[kubernetes_pod_disruption_budget_v1]]</code> | ||
+ | * <code>[[Cannot disrupt Node]]</code> | ||
+ | * <code>[[Cannot disrupt NodeClaim]]</code> | ||
== See also == | == See also == |
Latest revision as of 15:53, 28 July 2024
- https://kubernetes.io/docs/concepts/workloads/pods/disruptions/#pod-disruption-budgets
- 1.4 Alpha, K8s v1.21 April 2021 GA, Eviction subresource 1.22
- https://github.com/kubernetes/enhancements/issues/85
- https://github.com/kubernetes/enhancements/tree/master/keps/sig-apps/85-Graduate-PDB-to-Stable
- https://kubernetes.io/docs/tasks/run-application/configure-pdb/
Contents
Commands[edit]
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[edit]
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[edit]
apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: zk-pdb spec: minAvailable: 2 selector: matchLabels: app: zookeeper
Related[edit]
maxUnavailable
NoPods
- Disruptions
- Karpenter
spec.replicas
- Eviction API
- 1.21 Graceful node shutdown
kubectl drain
kubectl drain your-node-name --ignore-daemonsets
- TopologySpreadConstraints
ttlSecondsUntilExpired
kubernetes_pod_disruption_budget_v1
Cannot disrupt Node
Cannot disrupt NodeClaim
See also[edit]
Advertising: