Skip to content

Cluster deletion failed because of PodDisruptionBudget #4416

@AmitBenAmi

Description

@AmitBenAmi

What were you trying to accomplish?

Deleting my EKS clusters

What happened?

When deleting a cluster, eksctl fails to delete the NodeGroups if I have PodDisruptionBudget on some of my deployments.
Logs attached under the logs section beneath

On the previous version I was using (v0.30.0) it didn't happen.
I saw that the NodeGroups draining process as part of the cluster creation was added in this commit

How to reproduce it?

I had 2 clusters:

  1. one with 3 nodes
  2. one with 14 nodes

When I ran eksctl delete cluster -f config.yaml, I got the eviction error, because the PDB is being violated.
After 25 minutes, the task failed.

Logs

2021-11-04 18:51:01 [!]  ignoring DaemonSet-managed Pods: <Daemonsets Pods>                        
2021-11-04 18:51:01 [!]  pod eviction error ("error evicting pod: <Pod of a Deployment with PDB>: Cannot evict pod as it would violate the pod's disruption budget.") on node <Node Name>

The PDB:

apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
  name: pdb
  namespace: default
spec:
  maxUnavailable: 1
  selector:
    matchLabels:
      app: pdb
status:
  currentHealthy: 1
  desiredHealthy: 2
  disruptionsAllowed: 0
  expectedPods: 3
  observedGeneration: 1

Anything else we need to know?

Versions

$ eksctl version: 0.70.0
kubectl version: v1.18.5
OS: Ubuntu

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions