Pod Disruption Budgets
Pod Disruption Budgets (PDBs) ensure that a minimum number of pods remain available during voluntary disruptions such as node upgrades or evictions. Cosmopilot allows you to configure PDBs for validator and node groups within a ChainNodeSet.
Examples
yaml
spec:
nodes:
- name: fullnode
instances: 3
pdb:
enabled: true
minAvailable: 2 # optional, defaults to instances - 1
validator:
pdb:
enabled: true
minAvailable: 3 # meaningful only when other validators existWith this configuration, Kubernetes will ensure that at least two fullnode pods remain running and, when multiple validators exist in the namespace, at least three validator pods stay available during maintenance operations.
You may also instruct Cosmopilot to ignore group labels on PDB checks. This is useful to ensure no downtime globally or per global ingress, instead of just per group.
yaml
ingresses:
- name: fullnodes
groups:
- fullnode-a
- fullnode-b
...
nodes:
- name: fullnode-a
instances: 3
ignoreGroupOnDisruptionChecks: true
pdb:
enabled: true
- name: fullnode-b
instances: 3
ignoreGroupOnDisruptionChecks: true
pdb:
enabled: trueNotes
- PDBs are currently supported only on
ChainNodeSetresources. minAvailabledefaults to the number of instances minus one for node groups.- A validator PDB only has an effect when multiple validators run in the same namespace; otherwise the default
minAvailable: 0leaves it ineffective. - During upgrades, PDBs are automatically disabled for
ChainNodeswith theUpgradingstatus.
