Learn how to permanently remove a Kubernetes cluster from your Vultr account
Deleting a Vultr Kubernetes Engine (VKE) cluster involves completely removing your VKE cluster’s infrastructure, including the control plane, worker nodes, and all associated resources. This process is final and should be performed carefully. VKE cluster provides a simple method to ensure the thorough and efficient deletion of your VKE cluster when it’s no longer required.
Follow this guide delete a Vultr Kubernetes Engine cluster from your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.
Send a GET
request to the List all Kubernetes Clusters endpoint and note the target VKE cluster's ID.
$ curl "https://api.vultr.com/v2/kubernetes/clusters" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete Kubernetes Cluster endpoint to delete the target VKE cluster.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete VKE Cluster and All Related Resources endpoint to delete the target VKE cluster along with all linked resources.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/delete-with-linked-resources" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List the available VKE clusters and note the target VKE cluster's ID.
$ vultr-cli kubernetes list --summarize
Delete the target VKE cluster.
$ vultr-cli kubernetes delete <cluster-id>
Delete the target VKE cluster along with all linked resources.
$ vultr-cli kubernetes delete --delete-resources <cluster-id>
Open your Terraform configuration where the VKE cluster is defined.
Remove the vultr_kubernetes
resource block, or destroy it by target.
resource "vultr_kubernetes" "vke" {
# ...existing fields (label, region, version, node_pools)
}
# To delete, either remove this block from configuration
# or run: terraform destroy -target vultr_kubernetes.vke
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 0 changed, 1 destroyed.
No comments yet.