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!