In Deckhouse Kubernetes Platform, you can deploy a local caching DNS server on each cluster node. It exports metrics to Prometheus for visualization in a Grafana dashboard.
This feature is implemented by the node-local-dns module.
The module consists of the original CoreDNS deployed as a DaemonSet on all cluster nodes,
along with a network configuration algorithm and iptables rules.
Detailed information about the problems that caching DNS-server allows to solve and the principle of its work is available in Caching DNS server in a cluster.
Example custom DNS configuration in a Pod
apiVersion: v1
kind: Pod
metadata:
name: dns-example
spec:
dnsPolicy: "None"
dnsConfig:
nameservers:
- 169.254.20.10
containers:
- name: test
image: nginx
For details on DNS configuration, refer to the Kubernetes documentation.