Kubernetes not able to drain node because of to tight disruption budget inside nginx ingress deployment
Summary
When draining a node in Kubernetes the nginx ingress deployment in gitlab-managed-apps namespace blocks the node from getting drained as it has a too tight pod disruption budget.
kubectl get pdb --all-namespaces
NAMESPACE NAME MIN AVAILABLE MAX UNAVAILABLE ALLOWED DISRUPTIONS AGE
gitlab-managed-apps ingress-nginx-ingress-controller 1 N/A 0 17d
gitlab-managed-apps ingress-nginx-ingress-default-backend 1 N/A 0 17d
Steps to reproduce
- Go to Gitlab and setup a GKE cluster via the integration
- Install helm and ingress integration into the cluster
- kubectl drain --force --ignore-daemonsets --delete-local-data --grace-period=10 ;
And watch how it drains and then freezes
Example Project
What is the current bug behavior?
GKE is not able to drain nodes
What is the expected correct behavior?
GKE should be able to drain nodes
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Results of GitLab application Check
Possible fixes
Bug for helm chart is resolved here https://github.com/helm/charts/blob/master/stable/nginx-ingress/templates/controller-poddisruptionbudget.yaml#L1