Skip to content

Instantly share code, notes, and snippets.

@devshawn
Last active May 22, 2020 23:05
Show Gist options
  • Save devshawn/844ec0cfc2c7a960ccfc0205cf949319 to your computer and use it in GitHub Desktop.
Save devshawn/844ec0cfc2c7a960ccfc0205cf949319 to your computer and use it in GitHub Desktop.

Kafka GitOps Local Cluster

  1. Ensure you have docker, docker-compose, and the Kafka CLI tools installed.
  2. Clone the kafka-gitops repository.
  3. Navigate into the docker folder, e.g. cd ./kafka-gitops/docker.
  4. Start up the Kafka cluster by running docker-compose up -d.
  5. Validate the logs look good by running docker-compose logs.
  6. 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
  1. Validate the topic was created successfully:
kafka-topics --bootstrap-server localhost:9092 --command-config admin.properties --list

Expected output:

test
  1. 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
  1. Yay! We now have a local Kafka cluster running with security enabled using the SASL_PLAINTEXT protocol and a user test with password test-secret.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment