此内容没有您所选择的语言版本。
Chapter 42. PodDisruptionBudgetTemplate schema reference
Used in: CruiseControlTemplate, KafkaBridgeTemplate, KafkaClusterTemplate, KafkaConnectTemplate, KafkaMirrorMakerTemplate, ZookeeperClusterTemplate
Full list of PodDisruptionBudgetTemplate schema properties
A PodDisruptionBudget (PDB) is an OpenShift resource that ensures high availability by specifying the minimum number of pods that must be available during planned maintenance or upgrades. Streams for Apache Kafka creates a PDB for every new StrimziPodSet or Deployment. By default, the PDB allows only one pod to be unavailable at any given time. You can increase the number of unavailable pods allowed by changing the default value of the maxUnavailable property.
StrimziPodSet custom resources manage pods using a custom controller that cannot use the maxUnavailable value directly. Instead, the maxUnavailable value is automatically converted to a minAvailable value when creating the PDB resource, which effectively serves the same purpose, as illustrated in the following examples:
-
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.
Example PodDisruptionBudget template configuration
42.1. PodDisruptionBudgetTemplate schema properties 复制链接链接已复制到粘贴板!
| 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 |