Skip to content

prodanlabs/kafka-kraft-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kafka-kraft-docker

Refer to bitnami/kafka

Rules for image tags

{SCALA_VERSION}-{KAFKA_VERSION}-{JDK_VERSION}

Environment

The configuration of kafka is passed in using environment variables, which start with KAFKA_CFG_. For example, to enable the configuration of Kafka delete.topic.enable=true, its environment variable is KAFKA_CFG_DELETE_TOPIC_ENABLE

Examples

run on docker

docker run --name kafka-0 -d  \
-e POD_NAME="kafka-0" \
-e KAFKA_CFG_ADVERTISED_LISTENERS="PLAINTEXT://:9092" \
-e KAFKA_CFG_CONTROLLER_QUORUM_VOTERS="[email protected]:9093" \
-e KAFKA_CFG_LISTENERS="PLAINTEXT://:9092,CONTROLLER://:9093" \
-e KAFKA_CFG_PROCESS_ROLES="broker,controller" \
-e KAFKA_CFG_CONTROLLER_LISTENER_NAMES="CONTROLLER"  \
prodan/kafka-kraft:2.13-3.4.0-jdk17

run on docker compose

# install docker compose plugin
apt install docker-compose-plugin

# clone repo
git clone https://github.com/prodanlabs/kafka-kraft-docker.git

# docker compose up
cd kafka-kraft-docker/examples/docker
docker compose up -d

run on kubernetes

# clone repo
git clone https://github.com/prodanlabs/kafka-kraft-docker.git

# create statefulset
kubectl create -f kafka-kraft-docker/examples/kubernetes/statefulset.yaml

Docker buildx

# Installing emulators
docker run --privileged --rm tonistiigi/binfmt --install all

# Create a new builder instance
docker buildx create --use --name kafka-builder

# If a builder instance is also created, you can view and set the current builder instance
docker buildx ls
docker buildx use  <name>

# Start a build 
docker buildx build --platform linux/arm64,linux/amd64 -t  <image-name> . --push

About

Kafka 3 kraft metadata schema container image

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published