<p>I'm running a cluster on EKS, and following the tutorial to deploy one using the command <code>eksctl create cluster --name prod --version 1.17 --region eu-west-1 --nodegroup-name standard-workers --node-type t3.medium --nodes 3 --nodes-min 1 --nodes-max 4 --ssh-access --ssh-public-key public-key.pub --managed</code>.</p>
<p>Once I'm done with my tests (mainly installing and then uninstalling helm charts), and i have a clean cluster with no jobs running, i then try to delete it with <code>eksctl delete cluster --name prod</code>, causing these errors.</p>
<pre><code>[ℹ]  eksctl version 0.25.0
[ℹ]  using region eu-west-1
[ℹ]  deleting EKS cluster &quot;test&quot;
[ℹ]  deleted 0 Fargate profile(s)
[✔]  kubeconfig has been updated
[ℹ]  cleaning up AWS load balancers created by Kubernetes objects of Kind Service or Ingress
[ℹ]  2 sequential tasks: { delete nodegroup &quot;standard-workers&quot;, delete cluster control plane &quot;test&quot; [async] }
[ℹ]  will delete stack &quot;eksctl-test-nodegroup-standard-workers&quot;
[ℹ]  waiting for stack &quot;eksctl-test-nodegroup-standard-workers&quot; to get deleted
[✖]  unexpected status &quot;DELETE_FAILED&quot; while waiting for CloudFormation stack &quot;eksctl-test-nodegroup-standard-workers&quot;
[ℹ]  fetching stack events in attempt to troubleshoot the root cause of the failure
[✖]  AWS::CloudFormation::Stack/eksctl-test-nodegroup-standard-workers: DELETE_FAILED – &quot;The following resource(s) failed to delete: [ManagedNodeGroup]. &quot;
[✖]  AWS::EKS::Nodegroup/ManagedNodeGroup: DELETE_FAILED – &quot;Nodegroup standard-workers failed to stabilize: [{Code: Ec2SecurityGroupDeletionFailure,Message: DependencyViolation - resource has a dependent object,ResourceIds: [[REDACTED]]}]&quot;
[ℹ]  1 error(s) occurred while deleting cluster with nodegroup(s)
[✖]  waiting for CloudFormation stack &quot;eksctl-test-nodegroup-standard-workers&quot;: ResourceNotReady: failed waiting for successful resource state
</code></pre>
<p>To fix them I had to manually delete AWS VPCs and then ManagednodeGroups, to then delete everything again.</p>
<p>I tried again with the steps above (creating and deleting with the commands provided in the official getting started documentation), but I get the same errors upon deleting.</p>
<p>It seems extremely weird that I have to manually delete resources when doing something like this. Is there a fix for this problem, am i doing something wrong, or is this standard procedure?</p>
<p>All commands are run through the official eksctl cli, and I'm following the <a href="https://docs.aws.amazon.com/eks/latest/userguide/getting-started-eksctl.html" rel="nofollow noreferrer">official eksctl deployment</a></p>

shaki
<p>If we try to delete the corresponding Security Group to which the Node Group EC2 is attached to, we will find the root cause.</p>
<p>Mostly it will say there is a Network Interface attached.</p>
<p>So the solution is to delete that linked Network Interface manually. Now the Node Group will be deleted without any error.</p>
