1

I've created a Cloud DNS Zone for example.com and pointed it's A record to Load Balancer's Static IP.

In the Load balancer, I have configured foo.example.com to point to the foo-backend-service:

enter image description here

When I navigate to foo.example.com, it doesn't work.

Do I need to explicitly create an A record entry for foo.example.com in the Cloud DNS Zone and point that to the Load Balancer's Static IP.

John Mike
  • 1,895
  • 3
  • 17
  • 26

1 Answers1

1

The domain names example.com and foo.example.com are different DNS names. Therefore you need to create DNS resource records for each one.

If you plan to keep example.com and foo.example.com pointing to the same load balancer, use a CNAME mapping foo.example.com to example.com. Otherwise create an A record with IP addresses pointing to the load balancer.

In your question you are showing your backend rules. Unless you need to specify rules for mapping urls, delete the extra entries and just use the default rule (I cannot see the right hand side so I don't know what you are trying to accomplish). I think you were trying to map foo.example.com to example.com which is not usually correct in your case.

John Hanley
  • 74,467
  • 6
  • 95
  • 159