---
# System prepended metadata

title: Destroy Kubernetes Cluster

---

# Destroy Kubernetes Cluster

> - **Objective:** Learn to destroy the cluster and revoke all related resources.
> - **Prerequisites:**
> - **Optionality:** Required
> - **Estimated time:** TBD

## Destroy resources using Terraform

> - **Optionality:** Required

Just use the `terraform destroy` command, terraform will be responsible for releasing all the resources it previously applied for.

### Command

```
$ terraform destroy
```

### Verify

The output will be like this:

```
Plan: 0 to add, 0 to change, 62 to destroy.
...
Do you really want to destroy all resources?
  Terraform will destroy all your managed infrastructure, as shown above.
  There is no undo. Only 'yes' will be accepted to confirm.

  Enter a value:
```

You will need to enter `yes` to proceed. The installation process will continue for a while. If successful, you will eventually see this output like before:

```
Destroy complete! Resources: 62 destroyed.
```

### Trouble shooting

#### Error: error deleting subnet (subnet-0536378d0b54b33cf): timeout while waiting for state to become 'destroyed' (last state: 'pending', timeout: 20m0s)

Access `https://{region}.console.aws.amazon.com/vpc/home?region={region}#vpcs` to remove vpc manually.

## Conform resources released on AWS

> - **Optionality:** Optional

In order to prevent abnormalities to cause unnecessary costs, we strongly recommend to do a double check on the AWS platform.

### Make sure the VPC is released

Open the AWS VPC management page in any browser. Remember to replace `{region}` with the acture region you are using, `us-west-1` for an example.

> https://{region}.console.aws.amazon.com/vpc/home?region={region}#vpcs

Make sure there is no `poc-cluster` in the list because it should be removed already.

### Make the volumes (block store) are released

Open the Volumes management page in any browser. Remember to replace `{region}` with the acture region you are using, `us-west-1` for an example.

> https://{region}.console.aws.amazon.com/ec2/v2/home?region={region}#Volumes

If there are any volumes belongs to `poc-cluster`, remove it.

