Resizing or adding a Node Pool to a Vultr Kubernetes Engine (VKE) cluster involves adjusting the number of worker nodes to better handle fluctuating workload demands. This capability allows you to scale your VKE cluster’s resources efficiently, ensuring optimal performance and availability as your application requirements change. Vultr Kubernetes Engine provides an intuitive process to either resize existing Node Pools or introduce new ones, enabling you to adapt to varying needs with ease.
Follow this guide to resize or add a Node Pool in your VKE cluster on your Vultr account using the Vultr Customer Portal, API, or CLI.
Navigate to Products and click Kubernetes.
Click your target VKE cluster to open its management page.
Click Nodes.
Click Add Node Pool.
Provide a Label, select Number of Nodes, select a Node Pool Type and Plan.
Click Create Node Pool, another Node Pool will be added to the VKE cluster.
Click Number of Nodes to resize any existing Node Pool.
Choose a scaling type amongst Autoscale and Manual.
For Autoscale: select Minimum Nodes and Maximum Nodes.
For Manual: select number of Nodes.
Click Apply to resize the Node Pool.
Send a GET
request to the List Kubernetes Clusters endpoint and note the target VKE cluster's ID.
$ curl -X GET "https://api.vultr.com/v2/kubernetes/clusters" \
-H "Authorization: Bearer $VULTR_API_KEY" \
-H "Content-Type: application/json"
Send a POST
request to the Create NodePools endpoint to add a Node Pool to the VKE Cluster.
$ curl -X POST "https://api.vultr.com/v2/kubernetes/clusters/<cluster-id>/node-pools" \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"node_quantity": 2,
"label": "secondnodepool",
"plan": "vc2-1c-2gb",
"tag": "my-tag",
"min_nodes": 2,
"max_nodes": 5,
"auto_scaler": true
}'
Send a GET
request to the Create NodePools endpoint and note target Node Pool's ID.
$ curl -X GET "https://api.vultr.com/v2/kubernetes/clusters/<cluster-id>/node-pools" \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json"
Send a PATCH
request to the Update NodePool endpoint to update the target Node Pool.
$ curl -X PATCH "https://api.vultr.com/v2/kubernetes/clusters/<cluster-id>/node-pools/<node-pool-id>" \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"node_quantity": 3,
"tag": "my-tag",
"min_nodes": 3,
"max_nodes": 6,
"auto_scaler": true
}'
List the available VKE clusters in your Vultr account and note the target VKE cluster's ID.
$ vultr-cli kubernetes list --summarize
Add another Node Pool to the target VKE cluster.
$ vultr-cli kubernetes node-pool create <cluster-id> \
--label "my-new-nodepool" \
--plan "vc2-2c-4gb" \
--quantity 3 \
--min-nodes 2 \
--max-nodes 6 \
--auto-scaler true \
--tag "new-tag"
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
Resize the target Node Pool.
$ vultr-cli kubernetes node-pool update <cluster-id> <node-pool-id> \
--quantity 5 \
--tag "updated-tag" \
--auto-scaler true \
--min-nodes 4 \
--max-nodes 10 \
--node-labels "nodepool=my-updated-nodepool"