第 29 章 Upgrading Streams for Apache Kafka
Upgrade your Streams for Apache Kafka installation to version 2.8 and benefit from new features, performance improvements, and enhanced security options. During the upgrade, Kafka is also be updated to the latest supported version, introducing additional features and bug fixes to your Streams for Apache Kafka deployment.
Use the same method to upgrade the Cluster Operator as the initial method of deployment. For example, if you used the Streams for Apache Kafka installation files, modify those files to perform the upgrade. After you have upgraded your Cluster Operator to 2.8, the next step is to upgrade all Kafka nodes to the latest supported version of Kafka. Kafka upgrades are performed by the Cluster Operator through rolling updates of the Kafka nodes.
If you encounter any issues with the new version, Streams for Apache Kafka can be downgraded to the previous version.
Released Streams for Apache Kafka versions can be found at Streams for Apache Kafka software downloads page.
Upgrade without downtime
For topics configured with high availability (replication factor of at least 3 and evenly distributed partitions), the upgrade process should not cause any downtime for consumers and producers.
The upgrade triggers rolling updates, where brokers are restarted one by one at different stages of the process. During this time, overall cluster availability is temporarily reduced, which may increase the risk of message loss in the event of a broker failure.
29.1. Required upgrade sequence 复制链接链接已复制到粘贴板!
To upgrade brokers and clients without downtime, you must complete the Streams for Apache Kafka upgrade procedures in the following order:
Make sure your OpenShift cluster version is supported.
Streams for Apache Kafka 2.8 requires OpenShift 4.12 and 4.14 to 4.17.
- Upgrade the Cluster Operator.
Upgrade Kafka depending on the cluster configuration:
-
If using Kafka in KRaft mode, update the Kafka version and
spec.kafka.metadataVersionto upgrade all Kafka brokers and client applications. -
If using ZooKeeper-based Kafka, update the Kafka version and
inter.broker.protocol.versionto upgrade all Kafka brokers and client applications.
-
If using Kafka in KRaft mode, update the Kafka version and
Migrating from ZooKeeper
If you’re currently running Kafka with ZooKeeper and want to migrate to KRaft, the operator upgrade process does not automatically handle the migration. You must perform a separate migration process. For more information, see 第 5.2 节 “Migrating to KRaft mode”.
From Streams for Apache Kafka 2.7, upgrades and downgrades between KRaft-based clusters are supported.