title: How to configure pod disruption budget to drain kubernetes node?
body: <p>I'd like to configure cluster autoscaler on AKS. When scaling down it fails due to PDB:</p>
  
  <pre><code>I1207 14:24:09.523313       1 cluster.go:95] Fast evaluation: node aks-nodepool1-32797235-0 cannot be removed: no enough pod disruption budget to move kube-system/metrics-server-5cbc77f79f-44f9w
  I1207 14:24:09.523413       1 cluster.go:95] Fast evaluation: node aks-nodepool1-32797235-3 cannot be removed: non-daemonset, non-mirrored, non-pdb-assignedkube-system pod present: cluster-autoscaler-84984799fd-22j42
  I1207 14:24:09.523438       1 scale_down.go:490] 2 nodes found to be unremovable in simulation, will re-check them at 2018-12-07 14:29:09.231201368 +0000 UTC m=+8976.856144807
  </code></pre>
  
  <p>All system pods have <code>minAvailable: 1</code> PDB assigned manually. I can imagine that this is not working for PODs with only a single replica like the <code>metrics-server</code>:</p>
  
  <pre><code>❯ k get nodes -o wide
  NAME                       STATUS   ROLES   AGE   VERSION   INTERNAL-IP   EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION      CONTAINER-RUNTIME
  aks-nodepool1-32797235-0   Ready    agent   4h    v1.11.4   10.240.0.4    &lt;none&gt;        Ubuntu 16.04.5 LTS   4.15.0-1030-azure   docker://3.0.1
  aks-nodepool1-32797235-3   Ready    agent   4h    v1.11.4   10.240.0.6    &lt;none&gt;        Ubuntu 16.04.5 LTS   4.15.0-1030-azure   docker://3.0.1
  
  ❯ ks get pods -o wide
  NAME                                    READY   STATUS    RESTARTS   AGE   IP            NODE                       NOMINATED NODE
  cluster-autoscaler-84984799fd-22j42     1/1     Running   0          2h    10.244.1.5    aks-nodepool1-32797235-3   &lt;none&gt;
  heapster-5d6f9b846c-g7qb8               2/2     Running   0          1h    10.244.0.16   aks-nodepool1-32797235-0   &lt;none&gt;
  kube-dns-v20-598f8b78ff-8pshc           4/4     Running   0          3h    10.244.1.4    aks-nodepool1-32797235-3   &lt;none&gt;
  kube-dns-v20-598f8b78ff-plfv8           4/4     Running   0          1h    10.244.0.15   aks-nodepool1-32797235-0   &lt;none&gt;
  kube-proxy-fjvjv                        1/1     Running   0          1h    10.240.0.6    aks-nodepool1-32797235-3   &lt;none&gt;
  kube-proxy-szr8z                        1/1     Running   0          1h    10.240.0.4    aks-nodepool1-32797235-0   &lt;none&gt;
  kube-svc-redirect-2rhvg                 2/2     Running   0          4h    10.240.0.4    aks-nodepool1-32797235-0   &lt;none&gt;
  kube-svc-redirect-r2m4r                 2/2     Running   0          4h    10.240.0.6    aks-nodepool1-32797235-3   &lt;none&gt;
  kubernetes-dashboard-68f468887f-c8p78   1/1     Running   0          4h    10.244.0.7    aks-nodepool1-32797235-0   &lt;none&gt;
  metrics-server-5cbc77f79f-44f9w         1/1     Running   0          4h    10.244.0.3    aks-nodepool1-32797235-0   &lt;none&gt;
  tiller-deploy-57f988f854-z9qln          1/1     Running   0          4h    10.244.0.8    aks-nodepool1-32797235-0   &lt;none&gt;
  tunnelfront-7cf9d447f9-56g7k            1/1     Running   0          4h    10.244.0.2    aks-nodepool1-32797235-0   &lt;none&gt;
  </code></pre>
  
  <p>What needs be changed (number of replicas? PDB configuration?) for down-scaling to work?</p>