Domain Name Service (DNS) provides domain name resolution services for workloads in Kubernetes clusters. CoreDNS, the default DNS server of a Kubernetes cluster, offers dynamic service discovery and domain name resolution, enabling services to communicate by name instead of IP address within the cluster. This topic describes how CoreDNS resolution works and its application in ACK Edge clusters.
CoreDNS resolution principles
Number | Description |
① | When a client pod attempts to access Service Nginx, the pod sends a request to the DNS server that is specified in the DNS configuration file /etc/resolv.conf. In this example, the IP address of the DNS server is 172.21.0.10, which is the IP address of Service kube-dns. The result of the resolution is 172.21.0.30. |
② | The client pod sends another request to 172.21.0.30, which is the IP address of Service Nginx. Then, the request is forwarded to the backend pods Nginx-1 and Nginx-2. |
CoreDNS in ACK Edge clusters
ACK Edge clusters consolidate computing devices from various regions and network domains into a unified Kubernetes cluster for centralized management. CoreDNS is deployed as a DaemonSet on each edge node to accommodate the distributed nature of edge devices.
When a client pod accesses a domain, it queries the local CoreDNS for resolution and connects to the target service or pod using the obtained address.
For detailed CoreDNS configuration instructions in ACK Edge clusters, see the following associated ACK topics:
ACK Edge clusters do not support NodeLocal DNSCache or ExternalDNS services.
Topic | Applicable | Description |
Applicable | N/A | |
Applicable | N/A | |
Partially applicable | ACK Edge clusters use the default domain host configuration. To customize the CoreDNS configuration, see CoreDNS custom configuration. | |
Applicable | N/A | |
Applicable | N/A | |
Partially applicable |
|