20.7. Approving an optimization proposal


You can approve an optimization proposal generated by Cruise Control, if its status is ProposalReady. Cruise Control will then apply the optimization proposal to the Kafka cluster, reassigning partitions to brokers and changing partition leadership.

Important

This is not a dry run. Before you approve an optimization proposal, you must:

Prerequisites

Procedure

Perform these steps for the optimization proposal that you want to approve.

  1. Unless the optimization proposal is newly generated, check that it is based on current information about the state of the Kafka cluster. To do so, refresh the optimization proposal to make sure it uses the latest cluster metrics:

    1. Annotate the KafkaRebalance resource in OpenShift with strimzi.io/rebalance=refresh:

      oc annotate kafkarebalance <kafka_rebalance_resource_name> strimzi.io/rebalance="refresh"
  2. Wait for the status of the optimization proposal to change to ProposalReady:

    oc get kafkarebalance -o wide -w -n <namespace>
    PendingProposal
    A PendingProposal status means the rebalance operator is polling the Cruise Control API to check if the optimization proposal is ready.
    ProposalReady
    A ProposalReady status means the optimization proposal is ready for review and approval.

    When the status changes to ProposalReady, the optimization proposal is ready to approve.

  3. Approve the optimization proposal that you want Cruise Control to apply.

    Annotate the KafkaRebalance resource in OpenShift with strimzi.io/rebalance=approve:

    oc annotate kafkarebalance <kafka_rebalance_resource_name> strimzi.io/rebalance="approve"
  4. The Cluster Operator detects the annotated resource and instructs Cruise Control to rebalance the Kafka cluster.
  5. Wait for the status of the optimization proposal to change to Ready:

    oc get kafkarebalance -o wide -w -n <namespace>
    Rebalancing
    A Rebalancing status means the rebalancing is in progress.
    Ready
    A Ready status means the rebalance is complete.
    NotReady
    A NotReady status means an error occurred—​see Fixing problems with a KafkaRebalance resource.

    When the status changes to Ready, the rebalance is complete.

    To use the same KafkaRebalance custom resource to generate another optimization proposal, apply the refresh annotation to the custom resource. This moves the custom resource to the PendingProposal or ProposalReady state. You can then review the optimization proposal and approve it, if desired.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部