25.2. Streams for Apache Kafka upgrade paths
Two upgrade paths are available for Streams for Apache Kafka.
- Incremental upgrade
- An incremental upgrade involves upgrading Streams for Apache Kafka from the previous minor version to version 2.7.
- Multi-version upgrade
- A multi-version upgrade involves upgrading an older version of Streams for Apache Kafka to version 2.7 within a single upgrade, skipping one or more intermediate versions. For example, upgrading directly from Streams for Apache Kafka 2.3.0 to Streams for Apache Kafka 2.7 is possible.
25.2.1. Support for Kafka versions when upgrading 复制链接链接已复制到粘贴板!
When upgrading Streams for Apache Kafka, it is important to ensure compatibility with the Kafka version being used.
Multi-version upgrades are possible even if the supported Kafka versions differ between the old and new versions. However, if you attempt to upgrade to a new Streams for Apache Kafka version that does not support the current Kafka version, an error indicating that the Kafka version is not supported is generated. In this case, you must upgrade the Kafka version as part of the Streams for Apache Kafka upgrade by changing the spec.kafka.version in the Kafka custom resource to the supported version for the new Streams for Apache Kafka version.
If you are upgrading to the latest version of Streams for Apache Kafka from a version prior to version 1.7, do the following:
- Upgrade Streams for Apache Kafka to version 1.7 following the standard sequence.
-
Convert Streams for Apache Kafka custom resources to
v1beta2using the API conversion tool provided with Streams for Apache Kafka. Do one of the following:
-
Upgrade Streams for Apache Kafka to version 1.8 (where the
ControlPlaneListenerfeature gate is disabled by default). -
Upgrade Streams for Apache Kafka to a version between 2.0 and 2.2 (where the
ControlPlaneListenerfeature gate is enabled by default) with theControlPlaneListenerfeature gate disabled.
-
Upgrade Streams for Apache Kafka to version 1.8 (where the
-
Enable the
ControlPlaneListenerfeature gate. - Upgrade to Streams for Apache Kafka 2.7 following the standard sequence.
Streams for Apache Kafka custom resources started using the v1beta2 API version in release 1.7. CRDs and custom resources must be converted before upgrading to Streams for Apache Kafka 1.8 or newer. For information on using the API conversion tool, see the Streams for Apache Kafka 1.7 upgrade documentation.
As an alternative to first upgrading to version 1.7, you can install the custom resources from version 1.7 and then convert the resources.
The ControlPlaneListener feature is now permanently enabled in Streams for Apache Kafka. You must upgrade to a version of Streams for Apache Kafka where it is disabled, then enable it using the STRIMZI_FEATURE_GATES environment variable in the Cluster Operator configuration.
Disabling the ControlPlaneListener feature gate
env:
- name: STRIMZI_FEATURE_GATES
value: -ControlPlaneListener
Enabling the ControlPlaneListener feature gate
env:
- name: STRIMZI_FEATURE_GATES
value: +ControlPlaneListener
25.2.3. Kafka version and image mappings 复制链接链接已复制到粘贴板!
When upgrading Kafka, consider your settings for the STRIMZI_KAFKA_IMAGES environment variable and the Kafka.spec.kafka.version property.
-
Each
Kafkaresource can be configured with aKafka.spec.kafka.version, which defaults to the latest supported Kafka version (3.7.0) if not specified. The Cluster Operator’s
STRIMZI_KAFKA_IMAGESenvironment variable provides a mapping (<kafka_version>=<image>) between a Kafka version and the image to be used when a specific Kafka version is requested in a givenKafkaresource. For example, 3.7.0=registry.redhat.io/amq-streams/kafka-37-rhel9:2.7.0.-
If
Kafka.spec.kafka.imageis not configured, the default image for the given version is used. -
If
Kafka.spec.kafka.imageis configured, the default image is overridden.
-
If
The Cluster Operator cannot validate that an image actually contains a Kafka broker of the expected version. Take care to ensure that the given image corresponds to the given Kafka version.