I am trying to start a controller using docker and passing all the configs via the controller properties file except the cluster_id. But its not responding to the properties file. I am using the following command to run:
$ docker run -d --name=kafka-controller-1 -h kafka-controller-1 -v /root/controller/controller.properties:/etc/kafka/kraft/controller.properties -e CLUSTER_ID='xxxxxxxxxxxxx' confluentinc/cp-kafka:7.5.1
It failed to start because it failed to read the parameters as defined in the properties file and generating the below error:
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ef1d6ca7e3fa confluentinc/cp-kafka:7.5.1 "/etc/confluent/dock…" 3 seconds ago Exited (1) 2 seconds ago kafka-controller-1
# docker logs kafka-controller-1
===> User
uid=1000(appuser) gid=1000(appuser) groups=1000(appuser)
===> Configuring ...
Running in Zookeeper mode...
KAFKA_ZOOKEEPER_CONNECT is required.
Command [/usr/local/bin/dub ensure KAFKA_ZOOKEEPER_CONNECT] FAILED !
But when passing the same parameters via environmental variable, docker run
is working fine. So is passing the properties file a standard supported approach or am I doing something incorrectly ?
I am following the steps as mentioned Configure and Monitor KRaft | Confluent Documentation for the properties file based deployment.