Common Migration Issues
Resolve common issues encountered during a ZooKeeper to KRaft migration using the following steps.
Issue: Kafka cluster ID mismatch between Kafka or KRaft CR status and the cluster
After a configuration change, the cluster ID shown in the Kafka and KRaft CR
status: and in the CR spec: don’t match.
Workaround:
The first recommended workaround is an automatic fix with an upgrade to CFK a release 2.11.0, 2.10.1, or 2.9.5.
If the upgrade isn’t possible, take the following steps to patch the status objects of KRaft and Kafka.
Verify if you have mismatching cluster IDs.
Fetch the
clusterIDvalue from the Kafka status:kubectl get kafka <kafka-cr-name> -n <namespace> -oyaml | grep "clusterID"
Fetch the correct cluster ID from the Kafka pod. For example:
Exec into one of the Kafka pods.
Fetch the cluster ID from
meta.properties:cat /mnt/data/data0/logs/meta.propertiesRetrieve the
cluster.idvalue from the output:#Wed Mar 05 12:55:23 GMT 2025 node.id=1 directory.id=pMP24m7YPMhy_F0e9ag_Wg version=1 cluster.id=f66a6843-54f1-4af8-b3Q
If the cluster ID from the Kafka status is different from the cluster ID in
meta.properties, use the correct cluster ID inmeta.propertiesto set the cluster ID in the status.Apply the block reconcile annotation:
kubectl annotate kraftcontroller <kraftcontroller-cr-name> \ -n <namespace> platform.confluent.io/block-reconcile=true
kubectl annotate kafka <kafka-cr-name> \ -n <namespace> platform.confluent.io/block-reconcile=true
Patch the status field:
kubectl patch kraftcontroller <kraftcontroller-cr-name> \ -n <namespace> --type=merge --subresource status \ --patch 'status: {clusterID: <Correct-cluster-id-here>}'
kubectl patch kafka <kafka-cr-name> \ -n <namespace> --type=merge --subresource status \ --patch 'status: {clusterID: <Correct-cluster-id-here>}'
Remove the block reconcile:
kubectl annotate kraftcontroller <kraftcontroller-cr-name> \ -n <namespace> platform.confluent.io/block-reconcile-
kubectl annotate kafka <kafka-cr-name> \ -n <namespace> platform.confluent.io/block-reconcile-
Fixed Versions: Upgrade to CFK 2.11.0, 2.10.1, or 2.9.5, which fixes this issue.