Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
docker-compose.yml for Kafka cluster demo
version: '2'
services:
zookeeper:
image: 'docker.io/bitnami/zookeeper:3-debian-10'
ports:
- '2181:2181'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
image: 'docker.io/bitnami/kafka:2-debian-10'
ports:
- '9092'
- '12345:12345'
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- JMX_PORT=12345
volumes:
- 'kafka2_data:/bitnami'
depends_on:
- zookeeper
kafka2:
image: 'docker.io/bitnami/kafka:2-debian-10'
ports:
- '9092'
- '12346:12346'
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- JMX_PORT=12346
volumes:
- 'kafka_data:/bitnami'
depends_on:
- zookeeper
kafka3:
image: 'docker.io/bitnami/kafka:2-debian-10'
ports:
- '9092'
- '12347:12347'
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- JMX_PORT=12347
volumes:
- 'kafka3_data:/bitnami'
depends_on:
- zookeeper
kafdrop:
image: 'docker.io/obsidiandynamics/kafdrop:3.27.0'
ports:
- '9000:9000'
environment:
- KAFKA_BROKERCONNECT=kafka:9092,kafka2:9092,kafka3:9092
depends_on:
- kafka
- kafka2
- kafka3
kafka_manager:
image: hlebalbau/kafka-manager:stable
ports:
- '9001:9000'
environment:
- ZK_HOSTS=zookeeper:2181
depends_on:
- kafka
- kafka2
- kafka3
kafka_kit:
image: wooga/kafka-kit:latest
entrypoint: ['tail', '-f', '/etc/hostname']
depends_on:
- kafka
- kafka2
- kafka3
volumes:
kafka_data:
driver: local
kafka2_data:
driver: local
kafka3_data:
driver: local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment