public instance CNAME for GCP compute instance

假装没事ソ 提交于 2020-01-05 00:43:30

问题


Azure provides a way to access a VM using *.cloudapp.net, is there something similar in GCP? If yes, where/how can I see the exact CNAME for accessing the instnace?

I read it that its *.googleapi.com, but not able to find it anywhere on GCP portal

Note this SO question comments says it should be of format computername.c.googleprojectid.googleapis.com, is that not correct?


回答1:


Google Cloud Compute Engine virtual machines (instances) are accessed by IP address outside Google Cloud or by internal DNS name inside Google Cloud. If you want a public DNS name, you must configure the public DNS name in your DNS server for your domain name.

Google Cloud does create an internal DNS name for your instance. However, this DNS name is private and only resolves in the same VPC as the instance.




回答2:


You could use Cloud DNS, while setting the name-servers at the registrar to Cloud DNS. See Updating your domain's name servers. This means, you'd have to provide your own domain-name and at least one external IP - even with external DNS. The location of the zone-file to edit merely depends upon which name-servers the domain registration has set.



来源:https://stackoverflow.com/questions/58475929/public-instance-cname-for-gcp-compute-instance

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