<p>I have deployed kafka on minikube by following <a href="https://docs.bitnami.com/tutorials/deploy-scalable-kafka-zookeeper-cluster-kubernetes" rel="nofollow noreferrer">https://docs.bitnami.com/tutorials/deploy-scalable-kafka-zookeeper-cluster-kubernetes</a>.</p>
<p>I'm able to create kafka topics, publish and consume messages from the topics through <code>kubectl</code> commands. When I installed kafka through helm chart, <code>kafka.kafka.svc.cluster.local</code> is the DNS name within the cluster.</p>
<p><code>helm install kafka bitnami/kafka --set zookeeper.enabled=false --set replicaCount=3 --set externalZookeeper.servers=zookeeper.kafka.svc.cluster.local -n kafka</code></p>
<p>I have tried in multiple ways, but not able to access this kafka cluster outside. I'm trying to publish messages to a kafka topic through sample producer code in IntelliJ, but the bootstrap server <code>kafka.kafka.svc.cluster.local</code> is not reachable.</p>

user3497321
<blockquote>
<p>but the bootstrap server kafka.kafka.svc.cluster.local is not reachable.</p>
</blockquote>
<p>That's internal CoreDNS record address, only. You'll need to define a headless service with exposed NodePort and optional TCP LoadBalancer that'll direct Ingress traffic into the cluster, along with an appropriate NetworkPolicy. Search the config for &quot;external&quot; - <a href="https://github.com/bitnami/charts/tree/master/bitnami/kafka#traffic-exposure-parameters" rel="nofollow noreferrer">https://github.com/bitnami/charts/tree/master/bitnami/kafka#traffic-exposure-parameters</a></p>
<p>Kafka is not unique in this way, so I suggest learning more about accessing k8s services outside the cluster. Or switch back to Docker Compose for simply testing a local Kafka environment with containers.</p>
<p>Note that the advertised listeners setting of each broker pods would need to return their individual, external broker addresses back to the client</p>
