minikube-kafka-cluster icon indicating copy to clipboard operation
minikube-kafka-cluster copied to clipboard

Is it possible to connect to kafka broker outside of kubernetes?

Open SnuK87 opened this issue 6 years ago • 4 comments

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.

SnuK87 avatar May 17 '19 06:05 SnuK87

You must create services with type NodePort referencing your pods

castocolina avatar Dec 13 '19 15:12 castocolina

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

bogdartysh avatar May 18 '20 21:05 bogdartysh

It is a really good example for minikube setup.

any update for connecting from outside?

zzswang avatar Jul 26 '20 15:07 zzswang

You must create services with type NodePort referencing your pods

how to do that?

yhjhoo avatar Oct 06 '21 09:10 yhjhoo