0
votes

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.

As soon as I do this, however, it is always automatically scaled up to 2. What can I do?

1
Hello @n00dle. How exactly did you try to disable/scale to 0? Which commands/methods have you tried?Wytrzymały Wiktor
I have scaled both deployments to 0. (Autoscaler and KubeDNS) "kubectl scale deploy kubedns --replicas=0"n00dle

1 Answers

1
votes

The scenario you are going through is described by the official documentation.

  • Make sure that you created your custom CoreDNS as described here.

  • Disable the kube-dns managed by GKE by scaling the kube-dns Deployment and autoscaler to zero using the following command:


kubectl scale deployment --replicas=0 kube-dns-autoscaler --namespace=kube-system
kubectl scale deployment --replicas=0 kube-dns --namespace=kube-system

  • If the above command will still not work than try the following one:

kubectl scale --replicas=0 deployment/kube-dns-autoscaler --namespace=kube-system 

kubectl scale --replicas=0 deployment/kube-dns --namespace=kube-system

Remember to specify the namespace.