apache-kafkaapache-zookeeper

upgrade Apache kafka from 2.7 version to 3.X without zookeeper on production kafka cluster


we have production Kafka cluster with 2.7 version , 5 Kafka brokers on RHEL 7.9 version

we want to upgrade the Kafka version to 3.X version

3.X version not include zookeeper , so we are wondering if we can do upgrade without any data loss

regarding to kafka 2.7 version , Kafka storing the metadata on zookeeper servers ( as brokers ids , topics names etc )

but is it possible to perform rolling upgrade from 2.7 to 3.x version without any data loss?


Solution

  • The upgrade guide should contain all infos you need.

    While KRaft mode (without ZooKeeper) is production ready since 3.3, they still keep ZooKeeper around for compatibility until the 4.0 release.

    Furthermore If I understand correctly, it is currently only possible to set up a fresh cluster in KRaft mode, but not to migrate an existing one with ZooKeeper. Kafka 3.5 will be a migration version they intend you to migrate from ZooKeeper to KRaft.

    This is explained quite nicely in the release notes from Kafka, especially for Kafka 3.3 and the release video

    As long as your Kafka brokers are not running with Java 8 still, you can simply do a rolling upgrade from 2.7 to 3.X like you are used to.