Migrate Confluent Platform from ZooKeeper to KRaft using Confluent for Kubernetes
This topic provides an overview of the migration process of your Confluent Platform deployment from ZooKeeper to KRaft by using Confluent for Kubernetes. The migration supports Confluent Platform version 7.6 and later.
Important
Confluent Platform 8.0 removes support for ZooKeeper. You must migrate to KRaft before you upgrade to Confluent Platform 8.0 or later.
If you are familiar with the migration process, skip to ZooKeeper to KRaft Migration to begin.
Why migrate to KRaft?
Migrating from ZooKeeper to KRaft delivers significant operational and architectural improvements:
Simplified architecture: Eliminates the need to deploy and manage a separate ZooKeeper cluster, reducing infrastructure complexity and operational overhead.
Faster metadata operations: KRaft propagates metadata faster and handles controller failover more quickly, improving cluster responsiveness during leadership changes.
Reduced operational overhead: Fewer components to monitor, patch, and maintain. No ZooKeeper quorum to manage, no separate ZooKeeper upgrades, and unified operational model.
Scalability improvements: KRaft scales more efficiently to larger clusters, maintaining lower metadata latency as your deployment grows.
Pre-migration checklist
Before starting the migration, ensure you have:
Upgrade before migration: Upgrade Confluent Platform to the target version first. You cannot upgrade and migrate at the same time.
Supported Confluent Platform version: Confluent Platform 7.6 is the minimum supported version. Use Confluent Platform 7.6.1 or later for production environments.
Supported CFK version: Use version 2.8.4 or later, 2.9.2 or later, 2.10.x, 2.11.x, or 3.0.x or later.
Confluent for Kubernetes only: You can migrate only CFK-based deployments. Migration for Helm-based deployments are not supported.
Cluster health: All Kafka and ZooKeeper pods must be running and healthy.
No existing KRaftController: Confirm that no KRaftController exists before starting.
Isolated mode only: Controller and broker nodes must be separate. Combined mode is not supported.
Migration time: Depends on cluster size and metadata volume during SETUP phase.
ACLs: Automatically copied from ZooKeeper to KRaft.
JBOD support: Multiple log directories (JBOD) are supported. JBOD is Early Access in Confluent Platform 7.7 or later.
No automatic rollback: Rollback is only possible during DUAL-WRITE phase. After finalize, rollback is not supported.
Manual cleanup required: ZooKeeper cluster is not automatically deleted. Remove migration locks and delete ZooKeeper manually after validation.
For more detailed information, see Before you begin.
How migration works
The migration process moves through distinct phases managed by CFK:
SETUP: Prepares the cluster for migration. KRaftController pods start running during this phase.
MIGRATE: Copies all metadata from ZooKeeper to KRaftController. This phase migrates topics, ACLs, configurations, and all cluster metadata. Kafka brokers roll once during this phase.
DUAL-WRITE: Both ZooKeeper and KRaft receive all metadata updates simultaneously. This is the validation phase where you can test cluster operations and roll back if needed. Rollback is only possible during this phase. The cluster remains in DUAL-WRITE until you apply either the finalize or rollback annotation.
MoveToKRaftControllerOnly (triggered by finalize annotation): Removes ZooKeeper dependency from Kafka and transitions to KRaft-only mode. Kafka brokers and KRaftController pods roll to remove migration configurations. This is the point of no return. Rollback is not possible once this phase begins.
RollbackToZk (triggered by rollback annotation during DUAL-WRITE): Returns the cluster to ZooKeeper mode. All data produced during DUAL-WRITE is preserved. Only available during the DUAL-WRITE phase.
COMPLETE: Final status indicating the migration has finished successfully. No further actions are performed in this phase.
For details about each phase, subphase, and the actions performed at each step, see ZooKeeper to KRaft Migration Phases and Sub-phases.