Chapter 44. PodDisruptionBudgetTemplate schema reference
Used in: CruiseControlTemplate, EntityOperatorTemplate, KafkaBridgeTemplate, KafkaClusterTemplate, KafkaConnectTemplate, KafkaExporterTemplate, ZookeeperClusterTemplate
Full list of PodDisruptionBudgetTemplate schema properties
A PodDisruptionBudget is an OpenShift resource that helps maintain high availability during planned maintenance or upgrades. It defines the minimum number of pods that must remain available at all times.
Streams for Apache Kafka creates one PodDisruptionBudget per component:
- Kafka cluster
- Kafka Connect
- MirrorMaker 2
- Kafka Bridge
- Entity Operator
- Kafka Exporter
- Cruise Control
Each budget applies across all pods deployed for that component.
A single PodDisruptionBudget applies to all associated node pool pods managed by the Kafka resource. This is true regardless of how many StrimziPodSet resources are created for that component. Disruption limits are applied at the component level, not per node pool.
By default, only one pod can be unavailable at a time. You can modify this limit using the maxUnavailable property.
StrimziPodSet custom resources are managed by a controller that does not use maxUnavailable directly. Instead, the value is automatically converted to minAvailable, which serves the same purpose.
For example:
-
If there are three broker pods and the
maxUnavailableproperty is set to1in theKafkaresource, theminAvailablesetting is2, allowing one pod to be unavailable. -
If there are three broker pods and the
maxUnavailableproperty is set to0(zero), theminAvailablesetting is3, requiring all three broker pods to be available and allowing zero pods to be unavailable.
The above examples also applies for the EntityOperator, Cruise Control, KafkaExporter deployments.
Example PodDisruptionBudget template configuration
Custom disruption budget behavior
To define custom disruption budget behavior, disable automatic PodDisruptionBudget generation. Set the STRIMZI_POD_DISRUPTION_BUDGET_GENERATION environment variable to false in the Cluster Operator.
You can then create your own PodDisruptionBudget resources. For example, apply separate budgets to specific node pools using label selectors with StrimziPodSet resources.
44.1. PodDisruptionBudgetTemplate schema properties Copy linkLink copied to clipboard!
| Property | Property type | Description |
|---|---|---|
| metadata |
Metadata to apply to the | |
| maxUnavailable | integer |
Maximum number of unavailable pods to allow automatic Pod eviction. A Pod eviction is allowed when the |