pod-disruption-budget-max-unavailable.yaml
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: pod-disruption-budget-max-unavailable-simple
spec:
maxUnavailable: "10%"
selector:
matchLabels:
app: app-simplepod-disruption-budget-min-available.yaml
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: pod-disruption-budget-min-available-simple
spec:
minAvailable: 2
selector:
matchLabels:
app: app-simplePod Disruption Budget Example
- Make sure Pod Disruption Budget is supported by your provider and/or cluster owner.
- Change the metadata
nametag to the name you want. - Set the
appvalue. All pods that have this label will fall under this Pod Disruption Budget. - Set the
minAvailableormaxUnavailablevalue. This can be an integer (for example when specififying minimum 3 pods should be available) or a percentage (for example when maximum 50% may be unavailable).
Reference: https://kubernetes.io/docs/tasks/run-application/configure-pdb/