Why does PodDisruptionBudget have both minAvailable and maxUnavailable options?

Viewed 1800

While I understand the use of minAvailable and maxUnavailable to an extent, I wonder why are these two options exposed when one appears to be the complement of the other.

Given that PDBs are immutable, changes to these parameters are rarely made (by redeploying PDB).

Is there anything that I am missing to realize here?

1 Answers

minAvailable and maxUnavailable are mutually exclusive, it's basically in the K8s docs :

You can specify only one of maxUnavailable and minAvailable in a single PodDisruptionBudget. maxUnavailable can only be used to control the eviction of pods that have an associated controller managing them.

An associated controller meaning: a deployment, statefulset, daemonset, etc.

Related