Learn how to remove node pools from your Vultr Kubernetes Engine (VKE) cluster to adjust your clusters resources.
Managing resources efficiently in a Vultr Kubernetes Engine (VKE) cluster includes the ability to remove individual worker nodes or delete entire Node Pools when scaling down infrastructure. Removing a single instance from a Node Pool ensures better cost management and workload reallocation, while deleting an entire Node Pool eliminates unnecessary resources and optimizes cluster performance.
Follow this guide to delete a Node or an entire Node Pool from a Vultr Kubernetes Engine cluster on 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 GET
request to the List NodePools endpoint to view all Node Pools and note the target Node Pool's ID.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/node-pools" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the Get NodePool endpoint and note the target Node's ID.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/node-pools/{nodepool-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete NodePool Instance endpoint to delete the target Node from the Node Pool.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/node-pools/{nodepool-id}/nodes/{node-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a DELETE
request to the Delete Nodepool endpoint to delete the target Node Pool.
$ curl "https://api.vultr.com/v2/kubernetes/clusters/{cluster-id}/node-pools/{nodepool-id}" \
-X DELETE \
-H "Authorization: Bearer ${VULTR_API_KEY}"
List the available VKE clusters in your Vultr account and note the target VKE cluster's ID.
$ vultr-cli kubernetes list --summarize
List all the available Node Pools in the VKE cluster and note the target Node Pool's ID.
$ vultr-cli kubernetes node-pool list <cluster-id> --summarize
List the attached instances of the target Node Pool and note the taget Node's ID.
$ vultr-cli kubernetes node-pool get <cluster-id> <nodepool-id>
Delete the target Node from the Node Pool.
$ vultr-cli kubernetes node-pool node delete <cluster-id> <nodepool-id> <node-id>
Delete the target Node Pool from the VKE cluster.
$ vultr-cli kubernetes node-pool delete <cluster-id> <nodepool-id>
Open your Terraform configuration for the existing VKE cluster.
Remove the Node Pool block you want to delete, or reduce node_quantity
to remove nodes.
resource "vultr_kubernetes" "vke" {
# ...existing fields (label, region, version)
# keep only the node pools you want to retain
node_pools {
node_quantity = 3
label = "pool-a"
plan = "vc2-2c-4gb"
}
# node_pools "pool-b" removed from configuration
}
Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
No comments yet.