下载
docker pull provectuslabs/kafka-ui:latest
新建配置文件
vim config.yml
# begin
kafka:
clusters:
-
name: Kafka集群
bootstrapServers: kafka01:9380,kafka02:9381,kafka03:9382
metrics:
port: 9999
type: JMX
AUTH_TYPE: "LOGIN_FORM"
SPRING_SECURITY_USER_NAME: admin
SPRING_SECURITY_USER_PASSWORD: admin
# end
启动
docker run --add-host kafka01:192.168.13.247 --add-host kafka02:192.168.13.247 --add-host kafka03:192.168.13.247 --name=kafka-ui -d \
-e KAFKA_CLUSTERS_0_NAME=aliyun-kafka-custer \
-e KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka01:9380,kafka02:9381,kafka03:9382 -p 8080:8080 \
provectuslabs/kafka-ui:latest