启动ES:
docker run --name es -p 0.0.0.0:9200:9200 -p 0.0.0.0:9300:9300 -d -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.11.1
启动Kibana:
docker run --name kabana --link es:elasticsearch -p 0.0.0.0:5601:5601 -d docker.elastic.co/kibana/kibana:7.11.1
创建一个index:
curl -XPUT localhost:9200/test
列出所有index:
curl -XGET localhost:9200/_cat/indices?v
删除一个index:
curl -XDELETE localhost:9200/test
访问Kibana:
create index pattern:
1.
2.
3.
创建完index,然后在Discover中可以查看该index的记录了。
参考:
官网docker安装指南:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html
- https://www.elastic.co/guide/en/kibana/current/docker.html
curl操作命令行:
- https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/indices.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html
其他: