1

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 ?

1
  • any help would really appreciated Nov 27 '19 at 9:58
1

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.

5
  • is it a default one ? or we should provide it with the vpc cidr ? Nov 27 '19 at 13:09
  • where is it coming from? Are you following a tutorial or looking at an existing installation, or what?
    – Matthew
    Nov 27 '19 at 13:46
  • @Matthew please add more details
    – 030
    Nov 27 '19 at 18:12
  • Hey Mathew, i am following a tutorial (linux academy) "kubernetes the hard way". there when creating the configuration file for kubelet and kube-proxy config files , a flag with cidr is mentioned and provided a value but my point is can i blindly take that value from the tutorial or i should change according to my vpc cidr ? Nov 28 '19 at 2:20
  • It depends on which networking provider you go with. Weave uses the 10.32.0.0/12 network by default. If you're going to use weave, keep it as is. If you're using a different one, read their documentation.
    – Matthew
    Nov 30 '19 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.