《Elastic Stack 实战手册》——三、产品能力——3.4.入门篇——3.4.1.Elastic Stack 安装部署——3.4.1.6.配置多节点集群(3) https://developer.aliyun.com/article/1231326
我们使用helm来对我们的Elasticsearch进行安装:
helm install elasticsearch elastic/elasticsearch -f ./values.yaml
上面的命令的输出为:
$ helm install elasticsearch elastic/elasticsearch -f ./values.yaml NAME: elasticsearch LAST DEPLOYED: Sun Apr 5 19:04:46 2020 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: 1. Watch all cluster members come up. $ kubectl get pods --namespace=default -l app=elasticsearch-master -w 2. Test cluster health using Helm test. $ helm test elasticsearch --namespace=default
我们使用上面显示的命令来进行监控:
kubectl get pods --namespace=default -l app=elasticsearch-master -w $ kubectl get pods --namespace=default -l app=elasticsearch-master -w NAME READY STATUS RESTARTS AGE elasticsearch-master-0 0/1 Running 0 98s elasticsearch-master-1 0/1 Running 0 98s elasticsearch-master-2 0/1 Running 0 98s elasticsearch-master-1 1/1 Running 0 106s elasticsearch-master-2 1/1 Running 0 110s elasticsearch-master-0 1/1 Running 0 116s
上面显示我们的Elasticseach已经被成功地部署好了。
接下来,我们来部署我们的Kibana:
helm install kibana elastic/kibana
我们可以通过如下的命令来监控Kibana的创建过程:
kubectl get pods -w $ kubectl get pods -w NAME READY STATUS RESTARTS AGE elasticsearch-master-0 1/1 Running 0 4m12s elasticsearch-master-1 1/1 Running 0 4m12s elasticsearch-master-2 1/1 Running 0 4m12s kibana-kibana-69f5ddd4bd-ql4s7 0/1 ContainerCreating 0 26s kibana-kibana-69f5ddd4bd-ql4s7 0/1 Running 0 60s
如果我们看到Kibana的状态已经变为Running,则表明我们的Kibana的创建是成功的。
最后,我们需要把Kibana的5601口进行port forward:
kubectl port-forward deployment/kibana-kibana 5601
上面命令的运行结果为:
$ kubectl port-forward deployment/kibana-kibana 5601 Forwarding from 127.0.0.1:5601 -> 5601 Forwarding from [::1]:5601 -> 5601 Handling connection for 5601
这样我们的Elasticsearch已经被成功部署了。我们启动浏览器,并输入地址localhost:5601
上面显示我们的Elasticsearch已经被成功部署了。
《Elastic Stack 实战手册》——三、产品能力——3.4.入门篇——3.4.1.Elastic Stack 安装部署——3.4.1.6.配置多节点集群(5) https://developer.aliyun.com/article/1231324