26.2. Downgrading KRaft-based Kafka clusters and client applications


Downgrade a KRaft-based Streams for Apache Kafka cluster to an earlier version. When downgrading a KRaft-based Streams for Apache Kafka cluster to a lower version, like moving from 3.7.0 to 3.6.0, ensure that the metadata version used by the Kafka cluster is a version supported by the Kafka version you want to downgrade to. The metadata version for the Kafka version you are downgrading from must not be higher than the version you are downgrading to.

注意

Consult the Apache Kafka documentation for information regarding the support and limitations associated with KRaft-based downgrades.

Prerequisites

  • The Cluster Operator is up and running.
  • Before you downgrade the Streams for Apache Kafka cluster, check the following for the Kafka resource:

    • The Kafka custom resource does not contain options that are not supported by the Kafka version being downgraded to.
    • spec.kafka.metadataVersion is set to a version that is supported by the Kafka version being downgraded to.

Procedure

  1. Update the Kafka cluster configuration.

    oc edit kafka <kafka_configuration_file>
  2. Change the metadataVersion version to a version supported by the Kafka version you are downgrading to; leave the Kafka.spec.kafka.version unchanged at the current Kafka version.

    For example, if downgrading from Kafka 3.7.0 to 3.6.0:

    apiVersion: kafka.strimzi.io/v1beta2
    kind: Kafka
    metadata:
      name: my-cluster
    spec:
      kafka:
        replicas: 3
        metadataVersion: 3.6-IV2 
    1
    
        version: 3.7.0 
    2
    
        # ...
    1
    Metadata version is changed to a version supported by the earlier Kafka version.
    2
    Kafka version is unchanged.
    注意

    The value of metadataVersion must be a string to prevent it from being interpreted as a floating point number.

  3. Save the change, and wait for Cluster Operator to update .status.kafkaMetadataVersion for the Kafka resource.
  4. Change the Kafka.spec.kafka.version to the previous version.

    For example, if downgrading from Kafka 3.7.0 to 3.6.0:

    apiVersion: kafka.strimzi.io/v1beta2
    kind: Kafka
    metadata:
      name: my-cluster
    spec:
      kafka:
        replicas: 3
        metadataVersion: 3.6-IV2 
    1
    
        version: 3.6.0 
    2
    
        # ...
    1
    Metadata version is supported by the Kafka version.
    2
    Kafka version is changed to the new version.
  5. If the image for the Kafka version is different from the image defined in STRIMZI_KAFKA_IMAGES for the Cluster Operator, update Kafka.spec.kafka.image.

    See 第 25.2.3 节 “Kafka version and image mappings”.

  6. Wait for the Cluster Operator to update the cluster.

    You can check the downgrade has completed successfully from the status of the Kafka resource.

  7. Downgrade all client applications (consumers) to use the previous version of the client binaries.

    The Kafka cluster and clients are now using the previous Kafka version.

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

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

让开源更具包容性

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

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部