<p>I have a CoreDNS running in our cluster that uses the Kube DNS service. I want to disable the AutoScaler and the Kube-DNS deployment or scale it to 0.</p>
<p>As soon as I do this, however, it is always automatically scaled up to 2. What can I do?</p>

<p>The scenario you are going through is described by the <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/custom-kube-dns" rel="nofollow noreferrer">official documentation</a>.</p>
<ul>
<li><p>Make sure that you created your custom CoreDNS as described <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/custom-kube-dns#creating_a_custom_deployment" rel="nofollow noreferrer">here</a>.</p>
</li>
<li><p>Disable the kube-dns managed by GKE by scaling the kube-dns Deployment and autoscaler to zero using the following command:</p>
</li>
</ul>
<hr />
<pre><code>kubectl scale deployment --replicas=0 kube-dns-autoscaler --namespace=kube-system
kubectl scale deployment --replicas=0 kube-dns --namespace=kube-system
</code></pre>
<hr />
<ul>
<li>If the above command will still not work than try the following one:</li>
</ul>
<hr />
<pre><code>kubectl scale --replicas=0 deployment/kube-dns-autoscaler --namespace=kube-system 

kubectl scale --replicas=0 deployment/kube-dns --namespace=kube-system
</code></pre>
<hr />
<p>Remember to specify the <code>namespace</code>.</p>
