问题描述
我刚刚在GCE中使用点击部署创建了一个弹性搜索集群,但我只能通过使用隧道访问它。这在我的情况下不是一个选择,因为还有其他开发人员,我不想给gcloud访问。我想打开9200端口的弹性搜索,所以他们可以通过IP地址连接,而不是隧道。我该如何实现?
打开弹性搜索实例的GCE防火墙中的端口9200。由点击部署创建的弹性搜索实例具有定义的elasticsearch标签,因此可以使用以下命令:
gcloud compute --project PROJECT firewall-rules create allow-elasticsearch \
pre>
--allow TCP:9200 \
--target-tags elasticsearch
查看了解有关GCE防火墙配置的其他信息
- 编辑以纠正弹性搜索的拼写错误
I've just created a elasticsearch cluster in GCE using "Click to Deploy", but I can only access it by using a tunnel. This is not a choice in my case, since there are other developers that I don't want to give gcloud access to. I would like to open port 9200 for elasticsearch so they could just connect to it by IP address and not with tunnel.
How can I achieve this?
解决方案Open port 9200 in your GCE firewall for the elasticsearch instances. elasticsearch instances created by "Click to Deploy" have the "elasticsearch" tag defined, so, you can use the following command:
gcloud compute --project PROJECT firewall-rules create allow-elasticsearch \ --allow TCP:9200 \ --target-tags elasticsearch
Check this answer for additional information on GCE firewall configuration.
--edit to correct misspelling of elasticsearch
这篇关于在弹性搜索实例上打开GCE防火墙以进行外部连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!