How to Attach an Instance to a Vultr Load Balancer

Updated on April 7, 2025

A Load Balancer distributes incoming traffic across multiple instances to improve performance, increase availability, and provide failover support. To function correctly, instances within the same geographic region must be attached to the Vultr Load Balancer.

Follow this guide to attach an instance to a Vultr Load Balancer 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 Load Balancers.
  2. Click your target Load Balancer to open its management page.
  3. Click Overview.
  4. Click Add Instance under Linked Instances.
  5. Select the target Instance from the drop-down, which displays instances available in the same region as the Load Balancer.
  6. Click Attach Instance.
  1. Send a GET request to the List Load Balancers endpoint and note the target Load Balancer's ID.

    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a GET request to the List Instances endpoint and note your target instance's ID, ensuring it is in the same geographic region as the Load Balancer.

    console
    $ curl "https://api.vultr.com/v2/instances" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  3. Send a PATCH request to the Update Load Balancer endpoint to attach instances to the target Load Balancer.

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "instances": [
                "<instance_1_id>",
                "<instance_2_id>"
            ]
        }'
    
  4. Send a GET request to the Get Load Balancer endpoint to fetch the details of the target Load Balancer.

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all available instances and note the target Load Balancer's ID.

    console
    $ vultr-cli load-balancer list
    
  2. List all available instances and note your target instance's ID, ensuring it is in the same geographic region as the Load Balancer.

    console
    $ vultr-cli instance list
    
  3. Update the target Load Balancer by attaching the new instances.

    console
    $ vultr-cli load-balancer update <load-balancer-id> --instances "<instance_1_id>" "<instance_2_id>" "<instance_3_id>"
    
  4. Get the details of the target Load Balancer.

    console
    $ vultr-cli load-balancer get <load-balancer-id>