A new version of Anthos clusters on AWS (GKE on AWS) was released on July 29. See the release notes for more information.

Service discovery and DNS

Service discovery is the process where workloads discover services without knowing their IP address. This topic describes how Anthos clusters on AWS (GKE on AWS) implements service discovery and managed domain name services (DNS).

Service discovery

Kubernetes automatically generates service names that use the following specification:


Workloads also access external services, like example.com, using DNS names. For more information on the behaviour of DNS in Kubernetes, see DNS for Services and Pods.


Anthos clusters on AWS uses CoreDNS to provide cluster DNS resolution. CoreDNS runs as a redundant, scaled Deployment in the kube-system namespace. The CoreDNS deployment has a Service that groups the CoreDNS Pods and gives them a single IP address. The CoreDNS Deployment scales with the cluster's size and usage.

NodeLocal DNSCache

Anthos clusters on AWS uses NodeLocal DNSCache to improve DNS lookup performance. NodeLocal DNSCache runs as a DaemonSet on each node in your cluster. When a Pod makes a DNS request, the request first goes to the DNS cache on the same node. If the cache can't resolve the DNS request, the cache forwards the request to either:

  • CoreDNS for an internal name (for example, foo.bar.svc.cluster.local)
  • The Amazon DNS server, for an external name (for example, google.com)

What's next

For an overview of how DNS is used in Kubernetes clusters, see DNS for Services and Pods.