-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consul service mesh across multiple clusters with kafka #14125
Comments
OK, finally figured out a solution after way too long playing with this. For anyone else wanting to deploy kafka inside the service mesh, the solution is to add the following annotaitons:
It is also necessary to add the following annotation to the external access service:
This isn't currently possible with the helm templates for kafka, but the modification is simple enough. Services then require the following annotations to connect to kafka:
and connecting via localhost to kafka:
|
Thank you for the insight @codex70 I'll pass this along to some folks that are also looking to do the same thing. |
@david-yu, just to let you know that the bitnami helm charts I'm working with to deploy kafka are open source, so I've made the necessary changes and this has now been added to the latest release. |
@codex70 do you have perhaps a gist we can follow to see how you're setting up Kafka with Consul K8s? I think something like this would be beneficial to share with the community. |
Hi @david-yu, The setup for kafka uses the bitnami helm charts, you will need version 18.2.0 or later. I have this working with 3 nodes. Here's a copy of the relevant values file contents.
You will also need to have a service account set up for kafka-headless and intentions for connecting systems. I created the following to help: service-intentions.yaml
serviceaccount.yaml
with the following added to the values file:
You also need to be careful to set up firewalls etc. wherever the cluster is deployed. I now have this working across multiple federated clusters. As an example, the connection from a spring boot application would look like the following:
The pod annotations for that deployment would look like:
Hope this helps provide some pointers. |
Overview of the Issue
I am unable to connect to kafka from a second data center using a mesh gateway.
Reproduction Steps
localhost
again, I get time out errors, however slightly different:Connection to node -1 (localhost/127.0.0.1:9094) could not be established. Broker may not be available.
Consul info for both Client and Server
Operating system and Environment details
Kubernetes clusters running in cloud environment
Log Fragments
The text was updated successfully, but these errors were encountered: