6

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?

Ela
  • 313
  • 3
  • 14

1 Answers1

9

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.

Rico
  • 58,485
  • 12
  • 111
  • 141
  • 3
    Also note this sentence in the official docs: "The use of `maxUnavailable` is recommended as it automatically responds to changes in the number of replicas of the corresponding controller." – collimarco Nov 08 '22 at 11:29