- Create the network :
$ docker network create --driver bridge kafka-net
- Create the folders :
$ mkdir -p {zookeeper,kafka}/{data,logs}
- Execute the docker compose :
$ docker-compose -f docker-compose.yml up -d
-
Access Kafka Manager : http://localhost:9000/.
-
Create a new cluster.
-
Name it as you like (Localtest for example).
-
IP : zookeeper:2181
-
Kafka version (corresponding here to the Kafka version inside the image : ches/kafka:0.10.2.1) : 0.10.2.1
And then create it.
This is done !
- Stop the containers and remove them :
$ docker-compose -f docker-compose.yml stop && docker-compose -f docker-compose.yml rm -vf
- Remove the docker network :
$ docker network rm kafka-net
- Remove content of Docker volumes (we need to do this trick to remove hidden and non-hidden files) :
$ rm -rf {zookeeper,kafka}/{data,logs} && mkdir -p {zookeeper,kafka}/{data,logs}