- Newest
- Most votes
- Most comments
My solution:
Update the EKS cluster networking configuration to remove the *RemoveAccess security groups which are blocking the deletion of the node groups.
EKS will remove the *RemoveAccess security groups from the Network Interfaces as well, so it breaks the dependency loop.
When you encounter a dependency loop while trying to delete an EKS node group, the issue is typically related to security groups being attached to network interfaces that are managed by EKS. The solution to this problem is to remove the security group from the EFS network interface that's blocking the deletion.
Based on your situation, you're experiencing a dependency violation where the security group (sg-0e77ae6cda1b4b0f8) is attached to ENIs that are managed by an AWS-owned account (392771493575), which is indeed the EKS service account.
Here's how to resolve this issue:
-
First, identify which EFS mount targets are using the security group. The ENIs you've identified are likely associated with an EFS file system.
-
Remove the security group from the EFS network interface. You'll need to modify the security groups associated with your EFS mount targets rather than trying to delete the ENIs directly (which you can't do since they're managed by AWS).
-
To do this, you can use the EFS console or AWS CLI to modify the security groups associated with your EFS mount targets, removing the problematic security group.
-
Once the security group is no longer attached to any EFS mount targets, you should be able to delete the node group successfully using:
aws eks delete-nodegroup --cluster-name llm-k8s-cluster --nodegroup-name gpu-l4-group-al2023
- After the node group is deleted, you can proceed to delete the cluster:
aws eks delete-cluster --name llm-k8s-cluster2
This approach addresses the dependency loop by breaking it at the security group attachment point, allowing the deletion process to proceed normally.
Sources
Delete EKS Node Group failed due to Security Group and ENI Dependency | AWS re:Post
Use DeleteNodegroup with a CLI - AWS SDK Code Examples
Amazon EKS examples using AWS CLI - AWS SDK Code Examples
Relevant content
- asked 2 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 7 months ago

I didn't find any EFS related resources with both AWS console and CLI.