Migrating clusters to k8s #5931
Replies: 3 comments 4 replies
-
This is not supported by Strimzi and to get something like that work for your migration would require quite a lot of hacking and lot of things you would need to figure out. Leaving that aside, if you wanna give it a try below are the answers for the sub-questions.
Well, the certificates are in Secrets. So you can always extract them and use them elsewhere. It is just a certiicate.
Well, this is not Strimzi. This is standard Kafka thing. It always works like that (well, the KIP-500 / Kraft mode changes that of course, but that is not production ready and not supported by Strimzi). For this kind of migration, you would probably need to first somehow move your existing Kafka cluster to use the Strimzi ZooKeeper - otherwise you would not be able to have it as one cluster. But I have no idea how to merge two ZooKeeper clusters with completely different data into one.
AFAIK the information about how to connect to the other brokers is shared through ZooKeeper. So that might not be a problem if you figure out how to share the ZooKeeper cluster. In the worst case, I guess you can always reconfigure your existing cluster to use different ports. But I don't think it would be needed. |
Beta Was this translation helpful? Give feedback.
-
We have the same problem, however our Kafka clusters are already on k8s. However, it does seem like this is a no, with perfectly valid reasons (KRaft ftw!). Merging Zookeeper clusters would also be very hard as @scholzj has mentioned. However for most people, if they can tolerate some downtime and data loss, MirrorMaker2.0 would be the way to go. |
Beta Was this translation helpful? Give feedback.
-
@jiahuijiang @vishwa35 @Manicben, I'm just curious to know if you were able to achieve the migration from apache-kafka to strimzi without downtime. I am looking for options to migrate the apache-kafka cluster to strimzi(by cloning PVC) without MM2, so I was wondering if any of you were able to succeed with your implementation. Thank you |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We are doing a migration for an existing Kafka stack to be running in k8s. The hope is to do the migration live and automatic without shutting down applications using Kafka, because we need to do this migration with many clients for multiple application each.
We have looked into using MirrorMaker, but MirrorMaker doesn’t guarantee persisting offsets across clusters. Even with KIP-545, there is only support for consumers if they are using consumer group and have Kafka tracks the consumer offset.
Unfortunately our application track offset internally instead, and use them very heavily for job progress and replay purpose. So migrating clusters using MirrorMaker means we have to do a lot of migration and translating in the application to keep it running correctly.
So we started to look into whether it’s possible to do a Mitosis style migration - adding some nodes in k8s, increase replicate factor, wait for data to be replicated, drop old nodes.
But since the nodes running in k8s are managed by Strimzi while the rest are not, we are see several challenges in this approach:
(1) TLS: for the internal communication between Strimzi brokers, it’s using certs generated by Strimzi operator, which our other nodes won’t have access to.
(2) It looks like Strimzi loads the list of brokers from zookeeper, what’s going to happen if some of them do not run in k8s? Is it possible to support a set of ‘unmanaged brokers’ that Strimzi will ignore the lifecycle of?
(3) Strimzi uses different port for control plane and replication listener than Kafka defaults. Will there be any issue when some of the brokers are using a different config than others?
Given the complexity, is there any other way to migrate the clusters and keep the record offsets?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions