Closed mathspanda closed 5 years ago
/cc @scholzj
For some historical reasons, the nodeport and loadbalancer listeners are TLS by default. And your producer doesn't seem to have any TLS configuration. You can disable the TLS by adding tls: false
. E.g.:
# ...
external:
type: nodeport
tls: false
overrides:
bootstrap:
nodePort: 32100
brokers:
- broker: 0
nodePort: 32000
- broker: 1
nodePort: 32001
- broker: 2
nodePort: 32002
# ...
It works. By the way, is there any way to expose zookeeper cluster outside? Some of kafka commands like kafka-topics.sh
still need to specify address of zookeeper.
We don't really support accessing Zookeeper even from 3rd party applications inside OpenShift. The reason is that Zookeeper is hard to secure etc.
If you really want, you can use this: https://gist.github.com/scholzj/6cfcf9f63f73b54eaebf60738cfdbfae
It should be quite simple to change the service to use node ports as well if you need it outside. But it is very insecure.
This is my Kafka CR.
This is the result of
kubectl get all -n linpeiyu
.Failed to send messages through command
kafka-console-producer.sh
.100.100.62.195
is the host ip.Is there something wrong?