kafka in Kubernetes cluster

0 votes
I have Kafka deployed and running in Kubernetes cluster. I have 3 kube-nodes in my kubernetes cluster. I have 3 Kafka and 3 zookeeper applications running and I have services zoo1,zoo2,zoo3 and kafka-1, kafka-2 and kafka-3 running corresponding to them. I am able to publish/consume from inside kubernetes cluster but I am not able to publish/consume from outside of kubernetes cluster i.e., from external machine not part of kubernetes cluster.
Oct 22, 2018 in Kubernetes by lina
• 8,110 points
186 views

1 answer to this question.

0 votes

Configure kafka container as follows:

  ports:
    - containerPort: 9092
    - containerPort: 9093
    env:
    - name: KAFKA_ZOOKEEPER_CONNECT
      value: "zookeeper:2181"
    - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
      value: "INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT"
    - name: KAFKA_ADVERTISED_LISTENERS
      value: "INTERNAL_PLAINTEXT://kafka-internal-service:9092,EXTERNAL_PLAINTEXT://123.us-east-2.elb.amazonaws.com:9093"
    - name: KAFKA_LISTENERS
      value: "INTERNAL_PLAINTEXT://0.0.0.0:9092,EXTERNAL_PLAINTEXT://0.0.0.0:9093"
    - name: KAFKA_INTER_BROKER_LISTENER_NAME
      value: "INTERNAL_PLAINTEXT"
answered Oct 22, 2018 by Hannah
• 16,570 points

Related Questions In Kubernetes

0 votes
1 answer
0 votes
1 answer

One user per node in kubernetes cluster

In your case with the information you've ...READ MORE

answered Oct 5, 2018 in Kubernetes by Kalgi
• 42,430 points
40 views
0 votes
1 answer
0 votes
1 answer

Create LoadBalancer for kubernetes cluster in aws

Hello @Lina, If you're running your cluster on ...READ MORE

answered Oct 8, 2018 in Kubernetes by Kalgi
• 42,430 points
64 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
3,061 views
+3 votes
1 answer
+5 votes
2 answers

Redirecting host to service path in kubernetes

What you are trying to do is ...READ MORE

answered Mar 27, 2018 in Kubernetes by DragonLord999
• 8,380 points
113 views
0 votes
3 answers

Retry pull image in a kubernetes pod

If the Pod is part of a ...READ MORE

answered Aug 29, 2018 in Kubernetes by Hannah
• 16,570 points
1,236 views