liveBook · Manning

Migration

As explained in Apache Kafka in Action

A ZooKeeper-to-KRaft migration is the controlled transition of Kafka cluster metadata management from ZooKeeper to KRaft.

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

How Apache Kafka in Action covers it

How deep it goes
Outlines upgrade stages, controller settings, replication, and a rollback point, while leaving detailed execution instructions to official documentation.
Examples
Uses a staged version-upgrade sequence and example migration settings for controllers and brokers.
What it assumes
Assumes an existing Kafka cluster managed by ZooKeeper and use of Kafka’s normal upgrade procedure.
What you can do after
Evaluate a migration plan by checking its upgrade order, controller configuration, and rollback point.
How it connects
Connects Kafka upgrades with ZooKeeper metadata and dedicated KRaft controllers.

Also explained in

Compare how 19 books explain migration →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Apache Kafka in Action. The section links point to the parts of the book it draws on.