Skip to content
Merged
30 changes: 29 additions & 1 deletion deploy-manage/uninstall/delete-a-cloud-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ applies_to:
serverless:
---

# Delete an Enterprise or Hosted deployment or a Serverless project
# Delete a cloud deployment

This page provides instructions for deleting several types of cloud deployments, and outlines key considerations before proceeding.

Expand Down Expand Up @@ -90,3 +90,31 @@ To restore a terminated deployment,
Narrow the list by name, ID, or choose from several other filters. To further define the list, use a combination of filters.
3. In the **Deployment Management** section, select **Restore** and then acknowledge the confirmation message.

## {{eck}} [elastic-cloud-kubernetes]

To delete a deployment managed by {{eck}}, you need to remove the corresponding custom resource from your Kubernetes cluster. This action deletes all {{es}} and {{kib}} pods and their associated persistent data.

To delete an Elasticsearch deployment created with {{eck}}:

1. Run the following command to delete the {{es}} custom resource:

```shell
kubectl delete elasticsearch <deployment-name>
```
For example:

```shell
kubectl delete elasticsearch test-deployment
```

This deletes the custom resource and all associated infrastructure, such as {{es}} nodes, services, and persistent data volumes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add a note about different options (if any) to retain data when deleting an Elasticsearch cluster.
Let's finalize this review and afterwards we will ping devs to see if they believe there's anything helpful to add in terms of persistent data options when deleting an Elasticsearch cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barkbay , or @pebrc : we are adding a short section in a doc to delete an ECK managed deployment. Would you please review it and let us know if you think ECK (or storage classes) provide anything useful in relation with persistent data retention that we could add in this part as a side note?

Otherwise we will be just saying that when deleting the Elasticsearch resource, persistent data volumes will be deleted also.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please review it and let us know if you think ECK (or storage classes) provide anything useful in relation with persistent data retention that we could add in this part as a side note?

There is a note here about preserving volumes when a cluster is deleted: https://github.com/elastic/docs-content/blob/main/deploy-manage/deploy/cloud-on-k8s/volume-claim-templates.md#controlling-volume-claim-deletion-k8s_controlling_volume_claim_deletion

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I've added a note about this based on the volume claim deletion guide. Let me know what you think @eedugon @barkbay and @shainaraskas .


2. If you also deployed {{kib}} or other stack components, delete those resources as well:

```shell
kubectl delete kibana <kibana-resource-name>
```

:::{{tip}}
To fully uninstall {{eck}} from your cluster including all managed resources and the ECK operator, refer to the [Uninstall Elastic Cloud on Kubernetes](/deploy-manage/uninstall/uninstall-elastic-cloud-on-kubernetes.md) guide.
:::
Loading