docker run -dit --name kibana -p 5601:5601 -v /opt/kibana/config/kibana.yml:/opt/kibana/config/kibana.yml -v /etc/timezone:/etc/timezone:ro -v /etc/loc altime:/etc/localtime:ro --hostname=kibana --privileged=true --privileged=true --restart=always -m 4G --oom-kill-disable=true kibana
注意配置文件/opt/kibana/config/kibana.yml的挂载
配置如下:
server.name: kibana server.host: "0.0.0.0" elasticsearch.hosts: [ "http://172.26.104.170:9200", "http://172.26.104.170:9201", "http://172.26.104.170:9202" ] xpack.monitoring.ui.container.elasticsearch.enabled: true elasticsearch.username: "elastic" elasticsearch.password: "xxxxxxxx"
请参加上一篇elasticsearch认证集群的搭建。