clusterDNS:
- "10.32.0.10"
The above is a flag passed to the kubelet file, i dont know what it refers to clsuter DNS ? Is it refers to VPC CIDR or any subnet CIDR ?
It is the address of the DNS server (probably CoreDNS but possibly kube-dns) for the cluster.
Kubernetes uses a DNS server within the cluster so pods can find each other using service names. This is the "cluster DNS" server. Every time a service is created, it gets registered in the DNS server.
In Linux, the /etc/resolv.conf
file is where the DNS server is configured. If you want to use Google's public DNS server (8.8.8.8) your /etc/resolv.conf
file has the entry nameserver 8.8.8.8
.
In Kubernetes, the kubelet process on a worker node configures each pod. Part of the configuration process is to create the file /etc/resolv.conf
and specify the correct DNS server. That server is spec'ed by the clusterDNS
configuration option.
How you set it (if you even need to set it yourself) depends on how you're installing kubernetes. It ultimately depends on the CNI provider you're using, but also if you're doing "kubernetes the hard way" versus kubeadm
.