How to Resize Node Pools for Vultr Kubernetes Engine Cluster

Updated on December 9, 2024

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.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  1. Navigate to Products and click Kubernetes.

  2. Click your target VKE cluster to open its management page.

  3. Click Nodes.

  4. Click Add Node Pool.

  5. Provide a Label, select Number of Nodes, select a Node Pool Type and Plan.

    Menu to provide new node pool configurations

  6. Click Create Node Pool, another Node Pool will be added to the VKE cluster.

  7. Click Number of Nodes to resize any existing Node Pool.

    Button to open the menu for increasing number of nodes in a node pool

  8. Choose a scaling type amongst Autoscale and Manual.

  9. For Autoscale: select Minimum Nodes and Maximum Nodes.

  10. For Manual: select number of Nodes.

  11. Click Apply to resize the Node Pool.

  1. Send a GET request to the List Kubernetes Clusters endpoint and note the target VKE cluster's ID.

    console
    $ curl -X GET "https://api.vultr.com/v2/kubernetes/clusters" \
        -H "Authorization: Bearer $VULTR_API_KEY" \
        -H "Content-Type: application/json"
    
  2. Send a POST request to the Create NodePools endpoint to add a Node Pool to the VKE Cluster.

    console
    $ 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
            }'
    
  3. Send a GET request to the Create NodePools endpoint and note target Node Pool's ID.

    console
    $ 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"
    
  4. Send a PATCH request to the Update NodePool endpoint to update the target Node Pool.

    console
    $ 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
            }'
    
  1. List the available VKE clusters in your Vultr account and note the target VKE cluster's ID.

    console
    $ vultr-cli kubernetes list --summarize
    
  2. Add another Node Pool to the target VKE cluster.

    console
    $ 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"
    
  3. List all the available Node Pools in the VKE cluster and note the target Node Pool's ID.

    console
    $ vultr-cli kubernetes node-pool list <cluster-id> --summarize
    
  4. Resize the target Node Pool.

    console
    $ 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"