此内容没有您所选择的语言版本。

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 maxUnavailable property is set to 1 in the Kafka resource, the minAvailable setting is 2, allowing one pod to be unavailable.
  • If there are three broker pods and the maxUnavailable property is set to 0 (zero), the minAvailable setting is 3, 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

# ...
template:
  podDisruptionBudget:
    metadata:
      labels:
        key1: label1
        key2: label2
      annotations:
        key1: label1
        key2: label2
    maxUnavailable: 1
# ...

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

Expand
PropertyProperty typeDescription

metadata

MetadataTemplate

Metadata to apply to the PodDisruptionBudgetTemplate resource.

maxUnavailable

integer

Maximum number of unavailable pods to allow automatic Pod eviction. A Pod eviction is allowed when the maxUnavailable number of pods or fewer are unavailable after the eviction. Setting this value to 0 prevents all voluntary evictions, so the pods must be evicted manually. Defaults to 1.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部