Skip to main content
Before running the removal instructions, review any data you want to retain and back it up before destroying the environment. This may include:

Overview

This guide describes how to remove the Poolside platform from Amazon Web Services (AWS). The removal process is organized into the following phases:
  1. Destroy deployment resources: Destroy Poolside Kubernetes workloads and the Application Load Balancer (ALB).
  2. Destroy node groups and add-ons: Destroy EKS node groups and cluster add-ons.
  3. Destroy infrastructure resources: Destroy remaining infrastructure resources, including the EKS cluster, VPC, and RDS database.
  4. Clean up deployment artifacts: Remove remaining artifacts, such as certificates and DNS records.

Prerequisites

These instructions assume that you deployed Poolside using the instructions in the Install on AWS guide.

Environment configuration

Set the following shell variables before starting. Reuse the values from your initial deployment. The bash commands throughout this guide reference these variables so you can copy and paste them directly. Provided by you:
export DEPLOYMENT_NAME=""        # Must match the name used in the initial install (for example, production, dev-team-name)
export AWS_REGION=""             # AWS region (for example, us-east-1, us-east-2)
export AWS_PROFILE=""            # AWS CLI profile (for example, default, work-profile)
export CONTAINER_REGISTRY_URI="" # Registry URI (for example, 123456789012.dkr.ecr.us-east-2.amazonaws.com)
export KEY_FILE=""               # SSH private key if using a bastion (for example, ~/.ssh/id_ed25519)
Provided by Poolside (contact Poolside if you do not have these):
export POOLSIDE_VERSION_TAG=""   # Version tag for Terraform containers

Removal

Step 1: Destroy Poolside deployment resources

Destroy the Poolside deployment resources, such as the Poolside Kubernetes pods and Application Load Balancer (ALB).
  1. If a bastion host was created during the installation, connect using SSH. If a bastion host was not created, run these steps from a host that has EKS cluster admin access.
    ssh -i $KEY_FILE ubuntu@<bastion-host-ip>
    
  2. Run the deployment container:
    Ensure you validate the path to terraform.tfvars and remote.tf so that they mount correctly into the container.
    podman run -it \
        -v $(pwd)/remote.tf:/poolside/deployment/remote.tf \
        -v $(pwd)/terraform.tfvars:/poolside/deployment/terraform.tfvars \
        -v ~/.aws:/poolside/.aws \
        -e AWS_PROFILE=$AWS_PROFILE \
        -w /poolside/deployment \
        $CONTAINER_REGISTRY_URI/poolsideai/poolside-self-managed-deployment:$POOLSIDE_VERSION_TAG
    
  3. Inside the container, run Terraform commands:
    terraform init
    terraform destroy
    
    Example output:
    Destroy complete! Resources: 25 destroyed.
    
  4. Exit the container.

Step 2: Destroy Poolside phase 2 infra resources

Destroy the Poolside infrastructure phase 2 resources, such as the CPU node group, GPU node group (if provisioned), and the cluster add-ons.
  1. Run the infra-phase-2 container:
    Ensure you validate the path to terraform.tfvars and remote.tf so that they mount correctly into the container.
    podman run -it \
        -v $(pwd)/remote.tf:/poolside/infra-phase-2/remote.tf \
        -v $(pwd)/terraform.tfvars:/poolside/infra-phase-2/terraform.tfvars \
        -v ~/.aws:/poolside/.aws \
        -e AWS_PROFILE=$AWS_PROFILE \
        -w /poolside/infra-phase-2 \
        $CONTAINER_REGISTRY_URI/poolsideai/poolside-self-managed-infra-phase-2:$POOLSIDE_VERSION_TAG
    
  2. Inside the container, run Terraform commands:
    terraform init
    terraform destroy
    
    Example output:
    Destroy complete! Resources: 22 destroyed.
    
  3. Exit the container.

Step 3: Destroy Poolside infrastructure resources

Destroy the Poolside infrastructure phase 1 resources, such as the EKS cluster, RDS database, and S3 buckets. If a bastion host was previously provisioned, this step will remove it, so run this step from a local machine.
  1. Run the infra-phase-1 container:
    Ensure you validate the path to terraform.tfvars and remote.tf so that they mount correctly into the container.
    podman run -it \
        -v $(pwd)/remote.tf:/poolside/infra-phase-1/remote.tf \
        -v $(pwd)/terraform.tfvars:/poolside/infra-phase-1/terraform.tfvars \
        -v ~/.aws:/poolside/.aws \
        -e AWS_PROFILE=$AWS_PROFILE \
        -w /poolside/infra-phase-1 \
        $CONTAINER_REGISTRY_URI/poolsideai/poolside-self-managed-infra-phase-1:$POOLSIDE_VERSION_TAG
    
  2. Inside the container, run Terraform commands:
    terraform init
    terraform destroy
    
    Example output:
    Destroy complete! Resources: 116 destroyed.
    
  3. Exit the container.

Step 4: Clean up deployment artifacts

Clean up any remaining deployment artifacts. You might need to manually remove the following:
  • DNS record
  • SSL certificate
  • Container images
  • Container repositories
  • Local files