Closed brunodomenici closed 5 years ago
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.
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.
Thanks a lot @everesio. Thats solved my problem.
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:
Any ideas? Thanks a lot!