When you delete your project or clusters, Porter automatically destroys your resources so you don’t get charged for any unused resources. In unforeseen circumstances, some resources may not be deleted, and you may need to manually delete them. Whilst this does not happen often, the following is a guide with specific steps on how to ensure that all resources have been deleted for each cloud provider.

AWS

Please note that the instructions in the following sections need to be used in the order they’re specified in; not following the sequence will result in errors whilst trying to delete resources that may be dependent on other resources within your account.

Deleting EKS

Go to the EKS section on your AWS console, and delete the cluster in question, if it’s visible.

EKS

Removing Auto Scaling Groups & Launch Configurations

On the EC2 dashboard, navigate to the Auto Scaling Groups section, and remove any auto scaling groups that contain your cluster’s name. Once they’re deleted, you need to delete any launch configurations that may be left over, containing your cluster’s name.

Autoscaling group

Removing Load Balancers & Elastic IPs

First, navigate to the VPC section in your AWS console to see the VPC’s that are currently in use. Select the VPC that belongs to the cluster you’ve provisioned, and copy the VPC ID. Then go to the Load Balancers section on the EC2 dashboard, and locate the load balancer for your cluster using the VPC ID you just copied as a filter - delete any load balancers found.

Terminating EC2 nodes

Deleting the EKS cluster and associated auto scaling groups and launch configurations will ensure your EC2 nodes are also terminated; you can navigate to the Instances section on the EC2 dashboard to confirm.

Removing VPC Resources

Navigate to the VPC section in your AWS console to see the VPC’s that are currently in use. Select the VPC that belongs to the cluster you’ve provisioned, and copy the VPC ID.

  1. Click on NAT Gateways, and use the VPC ID to filter out the NAT Gateway for your cluster; select it and then click on Actions -> Delete NAT Gateway.NAT gateway
  2. After ensuring the NAT Gateway was deleted, navigate to Internet Gateways, and use the VPC ID to locate the Internet Gateway for your cluster; select it and click on Actions -> Detach from VPC. Once the gateway is detached, select Actions -> Delete Internet gateway. If detaching the gateway throws an error about unmapped public IPs, go to the Elastic IPs section and release any elastic IPs associated with the VPC ID.
  3. After all gateways have been deleted, go to the Subnets section, and remove all subnets associated with the cluster VPC, by clicking on Actions -> Delete subnet.
  4. Finally, you can delete the VPC by going to Your VPCs and deleting the VPC for your cluster, by selecting Actions -> Delete VPC.

Delete VPC