I have deployed Kafka & Zookeeper using "https://medium.com/@oleksii/how-to-deploy-apache-kafka-cluster-zookeeper-in-kubernetes-c5b04f01ac20"
I have used https://github.com/PharosProduction/tutorial-apache-kafka-cluster for the source code. I am able to test the Producer & Consumer internally with localhost:port and is working fine. When i am trying to use teh load balancer IP address, it does not work. Can someone please help me .
If you want to access services running inside your cluster, you need to expose them externally. Update the service type from ClusterIP to LoadBalancer in your service.yaml files. That should create a publicly accessible endpoint for your Kafka. You can see what the public IP address is by running kubectl get services.
You may need to update kafka service 2 and 3 to run on different ports (e.g. 9093,9094) in order to make them publicly accessible.
This method of running Kafka may not be very useful beyond testing purposes. None of the Kafka pods have persistent storage making your topics vulnerable to data loss.