我想在docker上建立一个Elasticsearch集群,并在多个主机中建立一个kibana容器,我有3个主机,我想为每个主机配置1个容器Elastic来创建集群,并在这个集群中配置1个kibana容器。但是我没有找到相关的文档。
有可能吗?怎么做?
我需要在compose或elasticsearch配置中进行配置吗?
我同时测试了(compose和elasticsearch配置),这是我的elasticsearch配置:
cluster.name: "docker-cluster"
network.host: 0.0.0.0
node.name: "es-node1"
node.master: true
node.data: true
network.host: IP es-node1
http.port: 9200
discovery.zen.ping.unicast.hosts: ["IP es1", "IP es2", "IP es3"]
# minimum_master_nodes need to be explicitly set when bound on a public IP
# set to 1 to allow single node clusters
# Details: https://github.com/elastic/elasticsearch/pull/17288
discovery.zen.minimum_master_nodes: 1
但是当我访问:localhost:9200 / _cluster / health?pretty
返回:
{
"cluster_name" : "docker-cluster",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 5,
"active_shards" : 5,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 10,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 33.33333333333333
}