Upgrade to Kraft
Kraft Migration
Section titled “Kraft Migration”The following steps are required to migrate to Kraft
- Migrate to KafkaNodePool
- Activate KafkaNodePool
- Add controller KafkaNodePool
- Enable Kafka Migration
- Set Kraft
- Cleanup
More info https://strimzi.io/docs/operators/latest/deploying#proc-deploy-migrate-kraft-str
Migrate to KafkaNodePool
Section titled “Migrate to KafkaNodePool”apiVersion: kafka.strimzi.io/v1beta2kind: KafkaNodePoolmetadata: name: kafka namespace: inma-kafka labels: strimzi.io/cluster: inma-kafka-clusterspec: replicas: 2 roles: - broker storage: type: jbod volumes: - id: 0 type: persistent-claim size: 10Gi deleteClaim: falseActivate KafkaNodePool
Section titled “Activate KafkaNodePool”Add the following line to Kafka Cluster Yaml
strimzi.io/node-pools: enabledExample
apiVersion: kafka.strimzi.io/v1beta2kind: Kafkametadata: name: my-cluster annotations: strimzi.io/node-pools: enabledspec: kafka: # ... zookeeper: # ...Add controller KafkaNodePool
Section titled “Add controller KafkaNodePool”apiVersion: kafka.strimzi.io/v1beta2kind: KafkaNodePoolmetadata: name: controller namespace: inma-kafka labels: strimzi.io/cluster: inma-kafka-clusterspec: replicas: 2 roles: - controller storage: type: jbod volumes: - id: 0 deleteClaim: false size: 10Gi type: persistent-claim template: pod: affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: - key: node-type operator: In values: - kafkaEnable Kraft Migration
Section titled “Enable Kraft Migration”kubectl annotate kafka inma-kafka-cluster strimzi.io/kraft="migration" --overwrite -n inma-kafkaSet Kraft
Section titled “Set Kraft”Only when status changed to KRaftPostMigration using
kubectl get kafka inma-kafka-cluster -n inma-kafka -wkubectl annotate kafka inma-kafka-cluster strimzi.io/kraft="enabled" --overwrite -n inma-kafkaCleanup
Section titled “Cleanup”Remove any ZooKeeper-related configuration from the Kafka resource