Last active
October 22, 2025 12:58
-
-
Save nobbynobbs/8ee1e4f493168f09dbffd13a76fac8d0 to your computer and use it in GitHub Desktop.
kafka and kafka-ui, without zookeeper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: kafka-sandbox | |
| services: | |
| kafka: | |
| image: bitnami/kafka:4.0.0 | |
| environment: | |
| - KAFKA_CLUSTER_ID=lkorDA4qT6W1K_dk0LHvtg | |
| # Start Kraft Setup (Kafka as Controller - no Zookeeper) | |
| - KAFKA_CFG_NODE_ID=1 | |
| - KAFKA_CFG_PROCESS_ROLES=broker,controller | |
| - KAFKA_CFG_BROKER_ID=1 | |
| - [email protected]:9093 | |
| - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT | |
| - KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER | |
| - KAFKA_CFG_LOG_DIRS=/tmp/logs | |
| - KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093,INTERNAL://:9094 | |
| # End Kraft Specific Setup | |
| - KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092,INTERNAL://kafka:9094 | |
| ports: | |
| - "0.0.0.0:9092:9092" | |
| kafka-ui: | |
| image: provectuslabs/kafka-ui | |
| ports: | |
| - "8080:8080" | |
| restart: "always" | |
| environment: | |
| KAFKA_CLUSTERS_0_NAME: "lkorDA4qT6W1K_dk0LHvtg" | |
| KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: kafka:9094 | |
| depends_on: | |
| - kafka |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if need to connect from remove server, should change the 127.0.0.1 to the server ip of the docker host.