- Ensure you have
docker
,docker-compose
, and the Kafka CLI tools installed. - Clone the kafka-gitops repository.
- Navigate into the
docker
folder, e.g.cd ./kafka-gitops/docker
. - Start up the Kafka cluster by running
docker-compose up -d
. - Validate the logs look good by running
docker-compose logs
. - Create a test topic by running the following:
kafka-topics --bootstrap-server localhost:9092 --command-config admin.properties --create --topic test --partitions 6 --replication-factor 1
- Validate the topic was created successfully:
kafka-topics --bootstrap-server localhost:9092 --command-config admin.properties --list
Expected output:
test
- Delete the topic so we go back to having a fresh Kafka cluster.
kafka-topics --bootstrap-server localhost:9092 --command-config admin.properties --delete --topic test
- Yay! We now have a local Kafka cluster running with security enabled using the
SASL_PLAINTEXT
protocol and a usertest
with passwordtest-secret
.