A ZooKeeper-to-KRaft migration moves Kafka cluster metadata management to KRaft. The transition can occur without downtime, but requires careful planning and a staged upgrade. section 7.3
Plan the transition in stages:
- Upgrade the existing cluster to the latest Kafka version that still supports ZooKeeper. section 7.3
- Provision dedicated KRaft controllers—typically three or five—with the same cluster ID, migration mode enabled, and ZooKeeper connection details. Configure the existing brokers for migration and provide the new controllers’ connection details. section 7.3
- Let the controllers replicate metadata from ZooKeeper. Once the completion message appears, the ordinary brokers are still in ZooKeeper mode, and reverting to ZooKeeper is still possible at this point. section 7.3
- Continue by migrating the ordinary brokers to KRaft, then upgrade Kafka to the latest version. Migration supports a dedicated KRaft-controller cluster; it does not reduce the number of machines operated. section 7.3
Completed migration of metadata from ZooKeeper to KRaft
Use the completion message as an operational checkpoint: it marks metadata replication, not the end of the broker transition. section 7.3


















