docker run -ti --rm -p 9092:9092 -v $(pwd):/data notuscloud/kafka:<tag>
Kafka will start with it's default parameters but you can override any parameter using ENV variable.
Let's say you want to override the broker.id
value, use the KAFKA_BROKER_ID
ENV variable.
If you want to change num.network.threads
, use the KAFKA_NUM_NETWORK_THREADS
ENV variable.
The following env variables are required:
K8S_STATEFULSET=true
K8S_HEADLESS_SERVICE_NAME
: Name of the headless svc associated with your statefulsetK8S_NAMESPACE
: the namespace where your statefulset is running
The default exposed port will be 9092
.
Kafka logs are stored in /data