Opening open GCE firewall on elasticsearch instances for external connection

前提是你 提交于 2019-12-08 00:40:54

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/29561826/opening-open-gce-firewall-on-elasticsearch-instances-for-external-connection

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!