`kube-dns-autoscaler` preventing GKE standard cluster to scale down

Asking for help? Comment out what you need so we can get more information to help you!

Cluster information:

Kubernetes version: 1.23.17-gke.1700
Cloud being used: gke
Installation method: standard GKE cluster, not autopilot
Host OS: Container-Optimized OS by Google

The question

Hi everyone, I need advice on GKE autoscaler not scalingDown a nodepool.

I’ve got a bunch of noScaleDown events with their details and I was thinking about the better way to handle them.
Specifically I can see that among “problematic” pods there is the kube-dns-autoscaler that prevents scaleDown with this reason: no.scale.down.node.pod.kube.system.unmovable

How I am supposed to handle this one? It’s running in single replica and I don’t think that I can’t run it multi-replica because there could be race conditions between multiple dns-scalers.
Is that pod “vital” or can I define a PodDisruptionBudget with minAvailable: 0 and thus “suffer” a reschedule on another node in case of node scale down?

I think that the answer is yes, I can do it, but any advice is welcome :slight_smile:

If you add a PDB for it, that should help:

apiVersion: policy/v1
kind: PodDisruptionBudget
  name: kube-dns-autoscaler-pdb
  namespace: kube-system
    app: kube-dns-autoscaler
  maxUnavailable: 1
      k8s-app: kube-dns-autoscaler

(You might do the same thing for kube-dns for the same reason.)


Yes, that’s exactly that I’ve done, and it works indeed :slight_smile:
Is well explained here, also, like you pointed out @MrWetsnowhttps://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#how-to-set-pdbs-to-enable-ca-to-move-kube-system-pods