We have a deployment with a single replica. I have also set a pod disruption budget with minimumAvailability = 1
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: app
spec:
minAvailable: 1
selector:
matchLabels:
app: app-selector
I have seen behaviour where clusterAutoscaler doesn't wait for the minimumAvailability to be healthy, and kills the pod.
My question is, does having a pod disruption budget works with replica number = 1 & minimum availability = 1?
Don't mix up PDB and maxUnavailable or MaxSurge : there are not the same..
PDB prevents you from scaling down your app against volontary disruptions only, like cluster upgrades where you drain a node for exempleminAvailable define how many pods should remain up on rollout.maxSurge define how many pods should be added on rolloutWhy do we need PodDisruptionBudget on AKS?
https://kubernetes.io/docs/tasks/run-application/configure-pdb/ https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-update-deployment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With