Service discovery and DNS overview
This topic describes how Anthos clusters on Azure interacts with Domain Name Services (DNS).
Service discovery is the process where workloads discover services without knowing the service's IP address. This section describes how Anthos clusters on Azure implements service discovery and managed DNS.
Kubernetes automatically generates service names that use the following specification:
service: your service's name
namespace: your service's Namespace
Workloads also access external services— for example
using DNS names. For more information on the behavior of DNS in Kubernetes, see
DNS for Services and Pods.
Anthos clusters on Azure uses
to resolve DNS names within clusters. CoreDNS runs as a redundant, scaled
Deployment in the
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.
Anthos clusters on Azure 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
- For an overview of how DNS is used in Kubernetes clusters, see DNS for Services and Pods.