Cannot delete ENI attached to destroyed EKS
Hello. via terraform I've created a stack with EKS. On EKS I did setup aws-load-balancer-ingress-conotroller and traefik.
Before to destroy everything via terraform I didn't delete the 2 pods for my alb and traefik service.
Doing so I'm not able to delete the eni created by these process.
I'm root in my account and I run also the following command
aws ec2 detach-network-interface --attachment-id eni-attach-xxxxxxxx --force
An error occurred (AuthFailure) when calling the DetachNetworkInterface operation: You do not have permission to access the specified resource.
Also I've a basic account, so I cannot contact the support in order to ask them to delete for me.
Can please someone shed some light ?
Thanks
Hello Michael and thanks for answering :)
The problem is that my cluster is already deleted but there is some security groups which was created by our deployment (aws-alb-ingress-controller) did created these eni. Because I deleted the cluster before to delete the aws-alb-ingress-controller, this made the ENI still attached and impossible to be removed.
How I can do that now ? I don't have the paying support :(
You are most likely trying to delete one of the network interfaces associated with the EKS cluster endpoint that is projected into your VPC. Since the EKS cluster is "owned" by AWS, you cannot delete the cluster's ENIs, even as the root account. Once you successfully destroy the cluster, the ENIs will disappear.
Also, please be advised that accessing AWS via the root account is a disfavored approach and so we do not recommend it. See our best practices guidance for additional details.
Relevant questions
I am trying to deploy the EKS cluster using s3 template but getting errors, please help me
asked 4 months agoAWS EKS - CloudFormation Script fails (just the documented tutorial with no changes)
asked 3 months agoFailing to terminate instance via CLI and console
asked 2 years agoCannot delete ENI attached to destroyed EKS
asked 4 months agoEKS Logging Bestpractice
Accepted AnswerEKS Anywhere Support
asked 20 days agoCannot delete ENI after delete the stack via Terraform
asked 4 months agoCannot stop a serive
asked 5 months agoUnable to create EKS Cluster
asked a month agoRunning FPGA machines on EKS
asked a month ago
That ENI is probably associated with an Application Load Balancer associated with your account that was created by the controller. Destroy the ALB and the ENIs will also be deprovisioned.