<p>Hi i am new to kubernets, i am using minikube single node cluster for local development and testing.</p>

<pre><code>Host: Ubuntu 16.04 LTS.
Minikube: Virtual box running minikube cluster
</code></pre>

<p>My requirement is i need to deploy kafka and zookeeper on minikube and should be used to produce or consume messages. 
I followed <a href="https://github.com/ramhiser/kafka-kubernetes" rel="nofollow noreferrer">this link</a> and successfully deployed it on minikube its details are below</p>

<pre><code>$ kubectl get services
NAME            CLUSTER-IP   EXTERNAL-IP   PORT(S)                      AGE
kafka-service   10.0.0.15    &lt;pending&gt;     9092:30244/TCP               46m
kubernetes      10.0.0.1     &lt;none&gt;        443/TCP                      53m
zoo1            10.0.0.43    &lt;none&gt;        2181/TCP,2888/TCP,3888/TCP   50m
zoo2            10.0.0.226   &lt;none&gt;        2181/TCP,2888/TCP,3888/TCP   50m
zoo3            10.0.0.6     &lt;none&gt;        2181/TCP,2888/TCP,3888/TCP   50m

$ kubectl get pods
NAME                                      READY     STATUS    RESTARTS   AGE
kafka-deployment-3583985961-f2301         1/1       Running   0          48m
zookeeper-deployment-1-1598963595-vgx1l   1/1       Running   0          52m
zookeeper-deployment-2-2038841231-tdsff   1/1       Running   0          52m
zookeeper-deployment-3-2478718867-5vjcj   1/1       Running   0          52m

$ kubectl describe service kafka-service
Name:           kafka-service
Namespace:      default
Labels:         app=kafka
Annotations:    &lt;none&gt;
Selector:       app=kafka
Type:           LoadBalancer
IP:             10.0.0.15
Port:           kafka-port  9092/TCP
NodePort:       kafka-port  30244/TCP
Endpoints:      172.17.0.7:9092
Session Affinity:   None
Events:         &lt;none&gt;
</code></pre>

<p>and i have set KAFKA_ADVERTISED_HOST_NAME to minikube ip(192.168.99.100).
Now for message producer i am using <code>$cat textfile.log | kafkacat -b  $(minikube ip):30244 -t mytopic</code> its not publishing the message giving below message </p>

<pre><code>% Auto-selecting Producer mode (use -P or -C to override)
% Delivery failed for message: Local: Message timed out
</code></pre>

<p>can any one help how to publish and consume message.</p>

<p>I followed as shown below. </p>

<pre><code>$ git clone https://github.com/d1egoaz/minikube-kafka-cluster

$ cd minikube-kafka-cluster

$ kubectl apply -f 00-namespace/

$ kubectl apply -f 01-zookeeper/

$ kubectl apply -f 02-kafka/

$ kubectl apply -f 03-yahoo-kafka-manager/

$ kubectl get svc -n kafka-ca1 (get the port of kafka manager like 31445)

$ minikube ip 
</code></pre>

<p>Put  <a href="http://minikube-ip:port" rel="nofollow noreferrer">http://minikube-ip:port</a> in browser to get ui page of kafka manager.</p>

<p>source <a href="https://technology.amis.nl/2019/03/24/running-apache-kafka-on-minikube/" rel="nofollow noreferrer">https://technology.amis.nl/2019/03/24/running-apache-kafka-on-minikube/</a></p>
