<p>I installed fresh kubernetes single node cluster and I see 2 coredns pods running. One of them is failing (not part of this question)</p>

<p>Why they are 2 of them?</p>

<p>Detailed tuning info for CoreDNS's on this <a href="https://github.com/coredns/deployment/blob/master/kubernetes/Scaling_CoreDNS.md" rel="noreferrer">link</a>.</p>

<blockquote>
  <p>CoreDNS memory usage is predominantly affected by the number of Pods and Services in the cluster. Other factors include the size of the filled DNS answer cache, and the rate of queries received (QPS) per CoreDNS instance.</p>
</blockquote>

<p>Two Replicas are for high availability (reduce the risk of CoreDNS downtime) and default value at install time.</p>

<p>You can change this by scaling down/up the deployment for coredns on your deployment. </p>

<p><strong>Default</strong></p>

<pre><code>$ kubectl describe deployment.apps -n kube-system coredns
Name:                   coredns
Namespace:              kube-system
CreationTimestamp:      Tue, 03 Mar 2020 09:28:50 +0000
Labels:                 k8s-app=kube-dns
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               k8s-app=kube-dns
Replicas:               2 desired | 2 updated | 2 total | 2 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  1 max unavailable, 25% max surge
</code></pre>

<p><strong>Scale Down to 1</strong></p>

<pre><code>$ kubectl scale deployments.apps -n kube-system coredns --replicas=1
deployment.apps/coredns scaled

$ kubectl describe deployment.apps -n kube-system coredns
Name:                   coredns
Namespace:              kube-system
CreationTimestamp:      Tue, 03 Mar 2020 09:28:50 +0000
Labels:                 k8s-app=kube-dns
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               k8s-app=kube-dns
Replicas:               1 desired | 1 updated | 1 total | 1 available | 0 unavailable
</code></pre>

<p><strong>Scale Up to 3</strong></p>

<pre><code>$ kubectl scale deployments.apps -n kube-system coredns --replicas=3
deployment.apps/coredns scaled

$ kubectl describe deployment.apps -n kube-system coredns
Name:                   coredns
Namespace:              kube-system
CreationTimestamp:      Tue, 03 Mar 2020 09:28:50 +0000
Labels:                 k8s-app=kube-dns
Annotations:            deployment.kubernetes.io/revision: 1
Selector:               k8s-app=kube-dns
Replicas:               3 desired | 3 updated | 3 total | 2 available | 1 unavailable
</code></pre>
