Google Cloud domain name for instance (like EC2)

2.3k views Asked by At

On creating an EC2 instance on AWS, you can access it via IP address or a domain name provided by Amazon out of the box:

enter image description here

Is there a similar thing available for Google Cloud out of the box? I'm on a network that blocks IP addresses, and wildcard DNS like xip.io, so I was curious to know about it. Also, is there a specific term this is called which I'm missing?

3

There are 3 answers

2
Parth Mehta On

Yes, you can forumate internal dns for instance using [INSTANCE_NAME].[ZONE].c.[PROJECT_ID].internal

See the following link for further information: https://cloud.google.com/compute/docs/internal-dns

3
Kolban On

When you create a GCP Compute Engine instance (EC2 equivalent) you can declare that you want it to have a public IP address. This is an IP that you can use over the Internet to access your instance. GCP gives you two types of IP ... static (stable) or ephemeral. A static IP is yours until you explicitly release it. There is no charge for this as long as your compute engine is running. An ephemeral IP is one which is allocated to you dynamically and may change following a restart of your compute engine instance.

GCP does not (currently ... things could always change) create a DNS entry that will resolve to your IP address over the Internet. It does create a DNS entry that can be used inside your GCP VPC network to allow one compute engine to call another within the GCP environment.

If you want to reach your Compute Engine via a DNS name it is your responsibility to create a DNS "A" record in your own DNS server. If you don't have a DNS server that you can use, then you can obtain a domain name for a few dollars and then create an instance of a GCP Cloud DNS Server and add an "A" record for your compute engine to that server.

See also:

0
Johny On

Please ensure the ports are open. You can visit the documentation as below for your reference, hope this helps. https://cloud.google.com/vpc/docs/firewalls