minikube-kafka-cluster
minikube-kafka-cluster copied to clipboard
Is it possible to connect to kafka broker outside of kubernetes?
First thanks for this helpful tutorial!
I have one question: Is it possible to connect to the kafka broker from the host machine outside of kubernetes?
I'm able to access the kafka-manager via http://192.168.99.105:31510 but when I try to connect to the kafka broker from my application via bootstrap-servers: 192.168.99.105:9092 I only get the error
org.apache.kafka.clients.NetworkClient : [Consumer clientId=consumer-1, groupId=dummyclienttester] Connection to node -1 could not be established. Broker may not be available.
Any help appreciated.
You must create services with type NodePort referencing your pods
hardly enaugh, as in this case the output will be something like "ailed to resolve 'kafka-0.kafka-nodeport.kafka-ca1.svc.cluster.local:9092': Name or service not know' , maybe KAFKA_ADVERTISED_HOST_NAME is needed ?
You must create services with type NodePort referencing your pods
It is a really good example for minikube setup.
any update for connecting from outside?
You must create services with type NodePort referencing your pods
how to do that?