Kafka operator creates a LoadBalancer service for each kafka replica #4364
Unanswered
superfly-git
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The way Kafka is designed, it requires the clients to have direct access to each of the brokers in the cluster. When the client connects, it uses the first connection to get the metadata about the brokers in the cluster. And then opens subsequent connections to the individual brokers where it needs to send / consume messages. So although you connected only over the bootstrap load balancer, the client really used all of them in the background. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have noticed that the Strimzi operator creates a my-cluster-kafka-external-bootstrap service of type load balancer which can be used to access the cluster externally. I tested that and its working.
It also create a separate K8s Service of type LoadBalancer for each kafka pod in the stateful set. If for example i put 3 kafka replicas it will create 3 services of type Load Balancer.
What is the purpose of those additional services/LBs since i have the my-cluster-kafka-external-bootstrap service which load balances among the kafka nodes/pods? This adds additional costs to something that should not be there if its a bug and not a configuration issue i have implemented wrong.
The yaml definition of the cluster is the below
The service output is the below:
FYI i use DigitalOcean as a cloud provider and the k8s cluster is created using KOPS. I installed the strimzi operator using Helm in a new namespace called kafka.
Beta Was this translation helpful? Give feedback.
All reactions