Skip to main content

Private DNS records not resolving in Compute Instance VMs [Resolved]

We've just set up our GCP project. We've got several Compute Engine VMs (centOS) running. We've set up a VPN between our production co-lo and GCP. All appears to be working fine.
We do have the networking (VPC) set up in one project and it is shared with the project that has the VMs.

I've set up Private DNS using the Cloud DNS and added in a test A record that has one of our co-lo IP addresses. The NS IP in the DNS matches the nameserver in the resolv.conf file.
When I try to ping the DNS record, I get "Name or service not known".
I believe that we've got everything set correctly, but we are not getting the name resolution.

Any help would be appreciated. Thanks!

Update 12/4/2018
Added the DNS to both projects and DNS resolves. If we remove it from either, then it doesn't work. Still doesn't sound right, but whatever.

Question Credit: r2t2
Question Reference
Asked December 5, 2018
Posted Under: Network
1 Answers

Working with Rackspace in getting this fixed. This is the answer I got from them:

Ok, final word from google shows that we will need to create the private zone and the records on the Host project (Shared VPC) and duplicate the zone only on the service project.
So, I have the full DNS with the A records in the Shared VPC project and just the zone defined in the project with the VMs.
All is working properly now. So strange.

credit: r2t2
Answered December 5, 2018
Your Answer