Google Kubernetes Cluster not autoscaling down even after adding a pod-disruption-budget

10/29/2021

In the autoscalar logs, I've ran into this issue:

      "reason": {
        "parameters": [
          "kube-dns-b4f5c58c7-26xdm"
        ],
        "messageId": "no.scale.down.node.pod.kube.system.unmovable"
      }
    } 

For this environment I've already applied an autodisruption budge of the following

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  annotations:
  labels:
    k8s-app: kube-dns
  name: kube-dns-bbc
  namespace: kube-system
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      k8s-app: kube-dns

I have ensured that the PDB has been succesfully applied on that environment, and am running 1.19.13-gke.1900.

-- Eric Gumba
google-kubernetes-engine
kubernetes

1 Answer

10/29/2021

Turns out I had multiple PDBs with the same value of

name: kube-dns-bbc

So when I applied these PDBs they were overwriting each other.

enter image description here

-- Eric Gumba
Source: StackOverflow