Where are the configurations for CoreDNS stored in Kubernetes
I was digging into CoreDNS recently on a cluster where kubeadm was used to install it. I see that I have a default deployment of 2 replicas, but what if I want more? I know I can scale, but that is an extra step that I'd rather not take. I want it so that all new clusters created have 3 CoreDNS for HA (since I will have 3 Masters). But I cannot find any information on where the manifests are stored which kubeadm uses.
I also want to set pod anti-affinity rules for the pods.
I may also want to configure the CoreDNS configmap.
Where are the configurations stored which kubeadm uses to install and configure CoreDNS?
Solution 1:
The configurations for CoreDNS are hard-coded into the manifest.go file. https://github.com/kubernetes/kubernetes/blob/master/cmd/kubeadm/app/phases/addons/dns/manifests.go#L59
Therefore, if you wanted customizations, you could fork the kubeadm branch and build your own.