How do I enable http traffic for GCE instance templates?

前端 未结 5 644
攒了一身酷
攒了一身酷 2020-12-20 17:48

When creating an instance template in Google Compute Engine, how do I enable http traffic for instances created from the template?

I was thinking that providing an h

5条回答
  •  离开以前
    2020-12-20 18:05

    The following should work in theory, but in practice, it didn't work.

    One potential solution is to enable http traffic for all of your instances in that project. To do so, from within GCE command line tools, run:

    gcloud compute firewall-rules create FIREWALL_RULE --allow tcp:80
    

    It's not clear to me that setting the rule for a particular instance template is possible, but hopefully someone will correct me if it is.

提交回复
热议问题