Stay on ZooKeeper mode safely, one migration window at a time
Consider a retailer running dozens of self-managed Kafka 3.x clusters on ZooKeeper. Kafka 4.0 removed ZooKeeper support, so every cluster needs its own migration to KRaft on 3.x before it can upgrade, and peak-season freezes limit how many can move each quarter.
Challenge
Kafka 4.0 runs only in KRaft mode. A cluster still in ZooKeeper mode cannot jump to 4.x; it has to migrate its metadata to a KRaft controller quorum first, and the community guidance is to do that on 3.9, the final 3.x line and the bridge release. The final 3.9 release is 3.9.2, and earlier lines such as 3.8 are already past end of life.
The migration itself is online, but it is a one-way door. Until the controllers are taken out of migration mode you can revert to ZooKeeper; after that step there is no supported way back. Each cluster therefore needs a rehearsal and a planned change, and a retailer's change calendar has long freezes around peak trading. Across a fleet the work runs for quarters, and the clusters waiting their turn run brokers and ZooKeeper ensembles that nobody upstream is patching.
Environment
Apache Kafka 3.6 to 3.9 on ZooKeeper 3.8, self-managed across Kubernetes and virtual machines. Clusters were built by different teams at different times, so their configurations have drifted.
Some use SCRAM credentials, some have monitoring agents and admin scripts that talk to ZooKeeper directly, and a few still serve clients that are many years old. Some ensembles also coordinate other systems, such as Solr or NiFi, so retiring an ensemble is a separate decision from moving Kafka off it.
Options
Migrate everything at once. Fast on paper, but each cluster needs a rehearsal and a change window, and the freezes cap how many windows exist.
Migrate in waves and leave the rest unpatched. The common default. The waiting clusters collect advisories in both Kafka and ZooKeeper while they wait.
Move to a managed Kafka service. It removes the ZooKeeper question but means a data migration and a new platform for every cluster.
Patch the waiting clusters and migrate in waves. The clusters that cannot move this quarter stay on patched Kafka and ZooKeeper builds, and each migration runs from the same runbook when its window opens.
Approach
OSSeva ships patched Apache Kafka builds for 3.6 to 3.9 and covers the ZooKeeper ensembles under them, so the clusters still waiting stay patched. Both are signed and delivered through your own registry.
Each migration then follows the same runbook. Upgrade the brokers to 3.9 while still on ZooKeeper. Check the features the migration does not carry, such as JBOD, SCRAM credentials or delegation tokens, on the exact release. Back up ZooKeeper, format three or five dedicated controller nodes with the existing cluster ID, and start them in migration mode. Roll the brokers with migration enabled until every broker has registered and the metadata has copied, then roll them again into KRaft mode. Hold there long enough to be confident, finalize, decommission ZooKeeper, and only then upgrade to 4.x.
Before the 4.x step, OSSeva Assure inventories clients, because Kafka 4.0 drops old client protocol versions, and finds the tooling that talks to ZooKeeper directly. OSSeva Operate can run the migrations and monitor the brokers 24/7 with a 15-minute P1 incident response SLA.
What this delivers
Every cluster patched until its migration window, one tested runbook applied cluster by cluster, and a fleet that reaches Kafka 4.x on a schedule the business sets. ZooKeeper ensembles that still serve Solr, HBase or NiFi stay covered after Kafka leaves them. OSSeva for Kafka is priced per cluster; book a discovery call for a quote.
Can a ZooKeeper-mode Kafka cluster upgrade straight to Kafka 4.0?
No. Kafka 4.0 runs only in KRaft mode, so the cluster must migrate to KRaft on a 3.x release first. The community guidance is to do that on 3.9, the bridge release.
Does the ZooKeeper to KRaft migration need downtime?
No. The migration is online: controllers join in migration mode, brokers roll with migration enabled, then roll again into KRaft mode. It still needs a planned change window, because the final step cannot be undone.
Can you roll back a KRaft migration?
Until the controllers leave migration mode, yes, by rolling the brokers back to their ZooKeeper configuration. After finalizing, there is no supported way back to ZooKeeper.
Does OSSeva patch ZooKeeper as well as Kafka?
Yes. OSSeva covers ZooKeeper 3.4 to 3.9, including patched builds for 3.4, 3.6 and 3.7 (3.5 as custom support scoped per engagement), which are past upstream end of life. Most recent ZooKeeper advisories come through bundled Netty, Jetty and logging libraries, and the patched build covers those too.
What breaks after the move to Kafka 4.0?
Usually not the migration itself. Kafka 4.0 drops old client protocol versions, so very old clients stop working, and tooling that talks to ZooKeeper directly loses its data source. Both are worth finding before the 4.x upgrade.