Pod Disruption Budget (PDB)
This page provides a detailed overview of the Pod Disruption Budget (PDB) API specification and its integration with H2O MLOps. A Pod Disruption Budget is a Kubernetes resource that specifies the minimum number of pods that must remain available during a disruption caused by voluntary actions (like scaling down) or involuntary actions (like node failures). PDBs help maintain application stability by preventing too many pods from being simultaneously unavailable. For more information about PDBs, see Disruptions.
PDB API specification
// Represents configuration for Pod Disruption Budget (PDB).
// Only one of the two options; min_available or max_unavailable should be specified.
message PodDisruptionBudgetSpec {
// Only one of these disruption policies can be specified
oneof disruption_policy {
// The minimum number of pods that must be available after the eviction
MinAvailable min_available = 1;
// The maximum number of pods that can be unavailable after the eviction
MaxUnavailable max_unavailable = 2;
}
}
The PodDisruptionBudgetSpec
defines the configuration for PDB. It includes a disruption_policy
, where users can specify either min_available
or max_unavailable
. Only one policy can be specified at a time. The min_available
policy represents the minimum number of pods that must be available after the eviction. The max_unavailable
policy represents the maximum number of pods that can be unavailable after the eviction.
// Represents minimum availability configuration
message MinAvailable {
oneof value {
int32 pods = 1; // Absolute number of pods
int32 percentage = 2; // Percentage of pods
}
}
MinAvailable
specifies the minimum availability of configuration.
// Represents maximum unavailability configuration
message MaxUnavailable {
oneof value {
int32 pods = 1; // Absolute number of pods
int32 percentage = 2; // Percentage of pods
}
}
MaxUnavailable
specifies the maximum unavailability of configuration.
Helm chart configuration
To enable PDB globally or for specific deployments, configure the Helm chart using the following parameters:
podDisruptionBudget:
# -- Whether to enable the PodDisruptionBudget globally.
# -- PS: This does not deploy a PDB for each deployment by default,
# -- instead it will just give user the ability to set a PDB for each deployment.
# -- If enabled, it will be possible to set a PDB for each deployment.
# -- If not, it won't be possible to set a PDB per deployment.
# -- PS: PDB should not be enabled for a deployment if VPA is enabled for that specific deployment.
enabled: false
The enabled
flag determines whether PDB can be configured for deployments. If enabled, users can set specific PDB configurations for each deployment. PDB should be disabled if VPA is enabled for the deployment.
- Submit and view feedback for this page
- Send feedback about H2O MLOps to cloud-feedback@h2o.ai