diff --git a/runKafka.sh b/runKafka.sh new file mode 100644 index 0000000..095d46b --- /dev/null +++ b/runKafka.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# network config for KRaft +docker network create app-tier --driver bridge +# Kafka with KRaft +docker run -d --name kafka-server \ + --hostname kafka-server \ + --network app-tier \ + -e KAFKA_CFG_NODE_ID=0 \ + -e KAFKA_CFG_PROCESS_ROLES=controller,broker \ + -e KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,CONTROLLER://:9093 \ + -e KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT \ + -e KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@kafka-server:9093 \ + -e KAFKA_CFG_CONTROLLER_LISTENER_NAMES=CONTROLLER \ + bitnami/kafka:latest \ No newline at end of file