Hi,
I would like to know if it is possible to change the exposed port of the kafka brokers when using the external listener.
Indeed, my company infrastructure is restricted on certain port range and I would like to expose my Kafka broker via AWS NLB with a different port than 9094.
I tried to use this option used for nodeport type :
external:
type: loadbalancer
tls: true
authentication:
type: scram-sha-512
overrides:
bootstrap:
dnsAnnotations:
external-dns.alpha.kubernetes.io/hostname: REDACTED
external-dns.alpha.kubernetes.io/ttl: "60"
address: REDACTED
nodePort: 8094
brokers:
- broker: 0
dnsAnnotations:
external-dns.alpha.kubernetes.io/hostname: REDACTED
external-dns.alpha.kubernetes.io/ttl: "60"
advertisedHost: REDACTED
nodePort: 8094
- broker: 1
dnsAnnotations:
external-dns.alpha.kubernetes.io/hostname: REDACTED
external-dns.alpha.kubernetes.io/ttl: "60"
advertisedHost: REDACTED
nodePort: 8094
- broker: 2
dnsAnnotations:
external-dns.alpha.kubernetes.io/hostname: REDACTED
external-dns.alpha.kubernetes.io/ttl: "60"
advertisedHost: REDACTED
nodePort: 8094
But the operator does not recognize the input : Contains object at path spec.kafka.listeners.external.overrides.bootstrap with an unknown property: nodePort.
I do not want to changes the current port used inside the cluster, I know that It is possible with to do that with AWS ELB but this require (for the eks implementation) to change the port of the k8s service which I did not find a way to configure it .
Thanks
We do not support this right now for load balancer type listeners. So you cannot do this. If you want, we can have an enhancement for it - but right now I cannot promise when we would get to it.
There are also some caveats to how NLB load balancers work in Kubernetes. Unless you have already done so, it might be worth reading this blog post: https://strimzi.io/blog/2020/01/02/using-strimzi-with-amazon-nlb-loadbalancers/ ... assuming you want to actually use one NLB for the whole cluster and not multiple separate NLB, you would need to do some manual setup in which case you can decide on the ports your self.
Yes I would really like that feature in a future release 馃憤
Yes I already read this article multiple times but I would like to keep all my configuration as automated and IaCish possible.
Ok ... I'm going to change this to enhancement.
Since 0.20.0, there is now more freedom to configure the listeners: https://strimzi.io/docs/operators/latest/full/using.html#type-GenericKafkaListener-reference ... the ports can now be configured to _9092 and higher with the exception of ports 9404 and 9999, which are already used for Prometheus and JMX._. Hope this helps.
Most helpful comment
Since 0.20.0, there is now more freedom to configure the listeners: https://strimzi.io/docs/operators/latest/full/using.html#type-GenericKafkaListener-reference ... the ports can now be configured to _9092 and higher with the exception of ports 9404 and 9999, which are already used for Prometheus and JMX._. Hope this helps.