How Do You Delete an AWS Security Group When You Get a Message about It Being Attached to a Network Interface?

Problem scenario
Recently you deployed Kubernetes to AWS using JuJu.  You are now eliminating the Security Groups that it created. You cannot delete a Security Group in AWS.  You get an error about the Security Group being associated with one or more network interfaces.   You cannot detach the network interface.  You even click the "Force detachment" and then click "Yes, Detach."  Nothing works to delete the network interface or remove the Security Group.

Solution
Go to "Load Balancers" in the AWS Console (web UI).  Delete the load balancer that was created by the Juju deployment of Kubernetes.  After one minute you may be able to delete the Security Group that was created for Kubernetes.

Leave a comment

Your email address will not be published. Required fields are marked *