# Deprovision

## Remove EKS Cluster

To deprovision a provisioned/managed Amazon EKS cluster,

- Click on Settings icon on the far right of the cluster and select **Delete**
- Select **Delete Cluster Completely** to delete cluster object from Rafay controller and all associated resources from the provider
- Select **Delete Cluster Object Only** to delete cluster from Rafay controller only
- Select/enter the cluster name and click **Delete this Cluster**

Once the delete request is submitted, the message below will be displayed, and the deletion process might take up to 20 minutes.

Users can view the cluster deletion status on the cluster dashboard, as shown below.

Users can also optionally monitor progress from AWS's Cloudformation service console.

* * *

## Delete Protection

Rafay supports enabling **Delete Protection** for EKS clusters to prevent accidental deletion.

### Enable During Cluster Creation

Delete Protection can be configured at cluster creation time in the **Cluster Settings** tab. Toggle on **Enable Delete Protection** to activate it.

### Enable/Disable After Cluster Creation (Day 2 Operations)

Delete Protection can also be managed post-provisioning from the cluster's details page. Under the **Delete Protection** row, click **Edit**, check or uncheck **Enable Delete Protection**, and click **Save**.

### Deleting a Protected Cluster

When Delete Protection is enabled, any attempt to delete the cluster will fail with the following error:

> _Cannot delete this cluster while EKS deletion protection is enabled. Turn off deleteProtection in the deployed EKS cluster config, then retry the delete._

To delete a protected cluster, disable **Enable Delete Protection** via either method above, then retry the deletion.
