<p>I have deployed Kafka &amp; Zookeeper using "<a href="https://medium.com/@_oleksii_/how-to-deploy-apache-kafka-cluster-zookeeper-in-kubernetes-c5b04f01ac20" rel="nofollow noreferrer">https://medium.com/@<em>oleksii</em>/how-to-deploy-apache-kafka-cluster-zookeeper-in-kubernetes-c5b04f01ac20</a>" </p>

<p>I have used <a href="https://github.com/PharosProduction/tutorial-apache-kafka-cluster" rel="nofollow noreferrer">https://github.com/PharosProduction/tutorial-apache-kafka-cluster</a> for the source code. I am able to test the Producer &amp; 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 . </p>

Nilesh Chaturvedi
<p>If you want to access services running inside your cluster, you need to expose them externally. Update the service type from <code>ClusterIP</code> to <code>LoadBalancer</code> 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 <code>kubectl get services</code>.</p>

<p>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.</p>

<p>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.</p>
