google-cloud-platformgoogle-kubernetes-enginevpcgoogle-cloud-dns

GCP Private DNS Zone not taking effect on GKE pods


I have a private Kubernetes cluster. The nodes of the cluster reside on a VPC. On that VPC I attach a private DNS zone. If I add a node to the VPC the DNS records, defined at the private DNS zone, they would be resolved by using an utility like nslookup. If I spin up a pod on the Kubernetes Cluster and try to do nslookup it will not take effect.

Server:     10.0.48.10
Address:    10.0.48.10#53

** server can't find xxx.xxxx: NXDOMAIN

By using a private DNS zone attached to a VPC:


Solution

  • You can check this link Using Cloud DNS for GKE I suggest taking a look at DNS scope, Requirements and Restriction. If your setup meets this information then from the same page you can check the “Pods unable to resolve DNS lookup” to perform some troubleshooting steps.