Docker安装Kibana8.9.0

Docker安装Kibana8.9.0

1.拉取kibana镜像

docker pull kibana:8.9.0

2.启动kibanna容器

docker run -d --name kibana01 -p 5601:5601 --network es -v kibanaconf:/usr/share/kibana/config 镜像id

3.查看kibanaconf位置并修改配置文件

docker inspect kibanaconf  #查看kibanaconf位置
# 修改后的配置文件
#
# ** THIS IS AN AUTO-GENERATED FILE **
# 
# Default Kibana configuration for docker target
server.host: "0.0.0.0"
server.shutdownTimeout: "5s"
elasticsearch.hosts: ["http://ip地址:9200/"]
elasticsearch.username: "elastic"
elasticsearch.password: "密码"
monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: "zh-CN"

4.重启容器

docker restart 容器id

5.查看kibana日志

docker logs -f 容器id

启动时遇到问题

FATAL Error: [config validation of [elasticsearch].username]: value of "elastic" is forbidden

解决办法

1.进入es容器,docker exec -it 容器id bash
$ bin/elasticsearch-users useradd test
$ bin/elasticsearch-users roles -a superuser test
$ bin/elasticsearch-users roles -a kibana_system test
2.修改kibana配置文件
#
# ** THIS IS AN AUTO-GENERATED FILE **
#

# Default Kibana configuration for docker target
server.host: "0.0.0.0"
server.shutdownTimeout: "5s"
elasticsearch.hosts: ["http://ip地址:9200/"]
elasticsearch.username: "test"
elasticsearch.password: "密码"
monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: "zh-CN"
3.重启容器
$ docker restart 容器id

你可能感兴趣的:(docker,elasticsearch)