Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

DNS Resolution Issue for Pod in GKE Autopilot Cluster with Cloud DNS

Hello Community,

I am facing a challenge with DNS resolution in a basic Google Kubernetes Engine (GKE) Autopilot cluster integrated with Cloud DNS.

  • Cluster Setup: I have set up a basic GKE Autopilot cluster and configured it to use Cloud DNS.
  • Pod and Service Deployment: I successfully launched a pod along with its associated service in the cluster.
  • Issue: While I can ping the pod using its IP address, I am unable to resolve the DNS name following the format pod-ip-address.my-namespace.pod.cluster-domain.namespace. This format is based on the Kubernetes documentation (https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#a-aaaa-records-1), which suggests that such a DNS resolution should be possible.
  • Troubleshooting Done: So far, I've verified that the pod and service are running correctly, and IP-based communication is functional. However, the DNS-based addressing for the pod seems to be failing.
  • Pod information :
> kubectl get pods xxx-7d6bc66766-2z86r -o wide                                                                              

NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES

xxx-7d6bc66766-2z86r 1/1 Running 0 11h 10.116.1.75 gk3-xxx-pool-2-9faf61c8-67td
  • Here is the command I run inside the pod :
root@XXX-7d6bc66766-2z86r:/# telnet 10.116.1.75 8080
Trying 10.116.1.75...
Connected to 10.116.1.75.
root@cxxx7d6bc66766-2z86r:/# telnet 10-116-1-75.default.pod.cluster.local 8080
telnet: could not resolve 10-116-1-75.default.pod.cluster.local/8080: Name or service not know

I would greatly appreciate any insights or suggestions on how to resolve this DNS issue. Is there a specific configuration within GKE Autopilot or Cloud DNS that I might be missing? Any help or guidance from those who have encountered and resolved similar issues would be highly beneficial.

Thank you in advance!

Solved Solved
0 3 1,657
1 ACCEPTED SOLUTION

Hi everyone,
I wanted to share some insights I gained from an official response by Google Support regarding the use of GKE Autopilot with Cloud DNS.
 
Key Takeaway: GKE Autopilot, in conjunction with Cloud DNS, currently does not support the publishing of Pod IPs in the DNS zone.
 
Why is this the case? The recent implementation of KubeDNS has removed the feature of Pod IP resolution. This capability was previously deprecated, and the latest specification update reflects this change. For those interested in the technical details, you can find the specific commit here: Kubernetes DNS Specification Update.
An internal discussion is currently underway regarding this issue, and a feature request has been submitted internally. However, the timeline for its implementation remains uncertain.
 
I hope this information is helpful for those configuring or troubleshooting their Kubernetes environments, especially in scenarios involving GKE Autopilot and Cloud DNS.

 

View solution in original post

3 REPLIES 3

Could you share the content of /etc/resolv.conf from one of the pods?

Hi everyone,
I wanted to share some insights I gained from an official response by Google Support regarding the use of GKE Autopilot with Cloud DNS.
 
Key Takeaway: GKE Autopilot, in conjunction with Cloud DNS, currently does not support the publishing of Pod IPs in the DNS zone.
 
Why is this the case? The recent implementation of KubeDNS has removed the feature of Pod IP resolution. This capability was previously deprecated, and the latest specification update reflects this change. For those interested in the technical details, you can find the specific commit here: Kubernetes DNS Specification Update.
An internal discussion is currently underway regarding this issue, and a feature request has been submitted internally. However, the timeline for its implementation remains uncertain.
 
I hope this information is helpful for those configuring or troubleshooting their Kubernetes environments, especially in scenarios involving GKE Autopilot and Cloud DNS.

 

Is there a resolution for this? We had to move back to a regular node based cluster. 

Top Labels in this Space