Skip to content
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

Question: Kubernetes: External IP, Service? #30

Closed
brunodomenici opened this issue Oct 11, 2019 · 3 comments
Closed

Question: Kubernetes: External IP, Service? #30

brunodomenici opened this issue Oct 11, 2019 · 3 comments

Comments

@brunodomenici
Copy link

Hi,

Is there any recommendation for deploy Kafka-proxy in Kubernetes and using a Service type LoadBalancing?
I did deploy it but I have to bind to and external IP and I don't have it on Pod.
I can't map to my LoadBalance hostname/ip:

 --bootstrap-server-mapping=original-bootstrap:9092,external-ip-hostname:9092", 

Any ideas?
Thanks a lot!

@everesio
Copy link
Contributor

everesio commented Oct 11, 2019

Hi,
There is an optional third parameter in bootstrap-server-mapping and you can use it as external name which will be advertised back to client.
--bootstrap-server-mapping "kafka-0.example.com:9092,0.0.0.0:32401,kafka-0.grepplabs.com:9092"
There must be a separate endpoint for each Kafka node. i.e. you need N * TCP Loadbalancers or one TCP with N different tcp ports / listeners.

I tested and used configuration with N Loadbalancers on GCP.

@everesio
Copy link
Contributor

everesio commented Oct 12, 2019

I forgot to mention that you must also map other nodes with external-server-mapping on each proxy instance

- '--bootstrap-server-mapping=kafka-{{ $i }}-0:9093,0.0.0.0:32400,kafka-gateway-{{ $i }}-0.{{ $.dnszone }}:32400'
{{- range $j := until (int $.brokers) }}
- '--external-server-mapping=kafka-{{ $j }}-0:9093,kafka-gateway-{{ $j }}-0.{{ $.dnszone }}:32400'
{{- end }}

Check out the https://gist.github.com/everesio/e6fae11ed69099ae3f867eddcd83db82 it should give you the idea.

@brunodomenici
Copy link
Author

Thanks a lot @everesio.
Thats solved my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants