Strimzi and KRaft
Kafka as two KRaft node pools under the Strimzi operator on minikube, with the order, notification, event-carried-state and ordering services run against it one set after another, unchanged.
examples/28-strimzi-and-kraft/ is a set of manifests and a verify.sh, with no Java. It declares Kafka as a Kafka resource and two KafkaNodePool resources, then deploys the order, notification, event-carried-state and ordering services against it. It accompanies Strimzi and KRaft.
It uses minikube, Strimzi, CloudNativePG, kustomize through kubectl, and the LGTM image, with the order, notification, event-carried-state and ordering services as they are.
examples/_k8s/cluster.sh up
cd examples/28-strimzi-and-kraft
./verify.sh
What to observe
- Two pools, two roles.
kubectl -n edp-kafka get kafkanodepoollistscontrollerandbrokerwith their roles and node ids. - The quorum.
kafka-metadata-quorum.sh describe --statusinside the broker pod names the controller as leader and only voter and the broker as the only observer. - Pods owned by StrimziPodSets. The broker and controller pods are not owned by a ReplicaSet or a StatefulSet.
- Services unchanged. The environment variable names of the Deployments equal those of the compose files; only the addresses differ.
- A replaced broker keeps its identity. After the broker pod is deleted, the new pod has the same node id and volume claim, and the topics hold the same records.
- A wrong address fails loudly. With
KAFKA_BROKERS=compose, notification-service never becomes ready and no notification appears.
Infrastructure
The edp minikube profile from examples/_k8s, with the Strimzi operator in edp-kafka, the CloudNativePG operator in cnpg-system, PostgreSQL in edp and LGTM in edp-lgtm. Ports 30080 and 30082 serve the application set that is deployed.