GKE pods unable to resolve Cloud DNS CNAME record and unable to connect to services outside vpc

Currently I have a GKE and GCE setup in the same VPC and for some reason I’m able to resolve the CNAME record in Cloud DNS as well as connect to that service from the GCE (the service locate in AWS and we already have a VPN between those 2 VPCs). But when I do the same on a pod in GKE , it unable to resolve CNAME record, it still able to resolve A record just fine. And also it unable to connect to that service located in AWS as well. I have already whitelist both the subnet IP of the GCE as well as the GKE.

Hi @ninh_pham ,

Can you add screenshots of your Cloud DNS setup as I have no visibility on your project?

Considering that the CNAME record has issues of not being resolved, does it have its original A record in a public zone or some other private zone? If it’s a private zone, is it on GCP or some other cloud provider?
As per documentation, with the current feature set, it is not possible to chase CNAMEs from a private zone to any other/different zone currently.

I recommend you to consider the workaround of adding an A record to the Cloud DNS Private Zone. You can also consider replacing CNAME with A record.

Hi @Marvin_Lucero ,

The problem is that, this issue only happen when I’m trying to resolve CNAME record from GKE, but if I do the same on a GCE instance, it’s able to resolve that CNAME record just fine, whereas on GKE pods it just said the service name not found.

Hi @ninh_pham ,

I have no visibility on your project and your question lacks details such as Cloud DNS setup screenshot, kube-dns config map, or service yaml.file which were needed to provide helpful answers. I recommend you to create a support case and coordinate it to GCP support.