Skip to main content
Version: 1.0.0

AWS Clean Up Guide for Zeet

This guide will help you clean up all resource in your AWS account that were created by Zeet if you no longer need them.

Step 1: Delete EC2 Instances via Autoscaling Group

Before you can delete any EC2 instances, you must first remove their controlling autoscaling groups:

  1. Navigate to EC2 Dashboard: Access the EC2 section within the AWS Management Console.
  2. Find Autoscaling Groups: Look for autoscaling groups linked to your cluster and delete them. This action also terminates the associated EC2 instances.

Step 2: Delete the EKS Cluster

After handling the EC2 instances and their autoscaling groups:

  1. Open EKS Dashboard: Navigate to the Amazon EKS section in the AWS Console.
  2. Locate Your Cluster: Find the cluster by its name.
  3. Initiate Cluster Deletion: Select the cluster and delete it. This process may take some time to complete.

Step 3: Delete Load Balancers and DNS Records

With the EKS cluster deleted, proceed to clean up the load balancers and DNS records:

  1. Access EC2 Dashboard: Go to the "Load Balancers" section.
  2. Identify and Delete Load Balancers: Find and delete any Kubernetes-created load balancers.
  3. Go to Route 53: Move to the Route 53 dashboard.
  4. Find Hosted Zone: Search for the DNS hosted zone tied to your cluster.
  5. Remove DNS Records: Delete unnecessary A and TXT records linked to the cluster.

Step 4: Delete VPC and Its Dependencies

Before you can delete the VPC:

  1. Delete Security Groups: In the VPC dashboard, find and delete cluster-associated security groups.
  2. Remove NAT Gateways: Locate and delete any NAT gateways within the VPC.
  3. Delete Subnets: Remove all subnets connected to your cluster.
  4. Detach and Delete Internet Gateways: Find, detach, and then delete internet gateways linked to your VPC.
  5. Remove Route Tables: Identify and delete any custom route tables.
  6. Attempt VPC Deletion: Now, try to delete the VPC. AWS will alert you if there are lingering dependencies.

Step 5: Cleanup Remaining Resources

Finally, ensure no leftover resources remain:

  1. Release Elastic IPs (EIPs): Release any unused EIPs.
  2. Delete IAM Roles and Policies: Go to IAM and remove roles and policies made for the cluster.
  3. Remove ECR Repositories: Delete Amazon ECR repositories associated with your cluster.
  4. Clean up ELB Tags: Ensure no residual ELB-related tags remain.
note
  • Ensure Backups: Make backups of important data before starting.
  • Watch for Dependencies: Be mindful of dependencies between resources.
  • DNS Propagation: DNS changes may take time to propagate.

Follow these steps carefully to ensure a thorough cleanup of resources created by Zeet in AWS. Double-check each action to prevent unintended resource deletions.


Fully Automated Cleanup via Zeet

If you prefer to have Zeet automatically clean up your AWS account, follow these steps to ensure a smooth and automated process:

  1. Verify Cloud Connection: Ensure your cloud account is still connected to Zeet. This connection is crucial for Zeet to access and manage resources on your behalf.

  2. Check Cluster Status: Make sure the cluster you wish to delete still exists and has not been unlinked from Zeet. Only clusters that are linked and visible in Zeet can be managed or deleted through the platform.

  3. Initiate Cluster Destruction:

    • Navigate to the Cluster Dashboard within the Zeet platform.
    • Locate the cluster you wish to delete.
    • Click the "Destroy Cluster" button. This action will initiate the automated process of cleaning up all resources associated with the cluster in your AWS account.

note
  • Data Backup: Before initiating the automated cleanup, ensure you have backups of any critical data. The destruction process is irreversible and will result in the deletion of all cluster resources.
  • Cluster Status: The automated cleanup process can only be initiated for clusters that are active and properly linked to Zeet. Clusters that have been manually unlinked or partially deleted through AWS cannot be cleaned up automatically.

By following these steps, you can leverage Zeet's automated cleanup feature to efficiently remove all traces of the cluster and its resources from your AWS account without manually navigating through the AWS Console.