Add existing instances to a Vultr cluster in bulk or individually. GPU clusters automatically configure fabric networking when instances join.
Adding instances to a cluster associates existing instances with the cluster and configures the fabric networking automatically. For GPU clusters, the high-performance interconnect (RoCE or InfiniBand) is provisioned when instances join — no manual VLAN or PKey setup is needed. You can add a single instance or multiple instances at once.
This guide explains how to add instances to a cluster using the Vultr API.
Send a GET request to the List Clusters endpoint to retrieve all clusters.
$ curl "https://api.vultr.com/v2/clusters" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the cluster to which you want to add instances.
Send a GET request to the List Instances endpoint to retrieve all instances.
$ curl "https://api.vultr.com/v2/instances" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the instance(s) you want to add to the cluster.
Send a POST request to the Bulk Add Instances endpoint to add multiple instances to the cluster. Replace {cluster-id} with the cluster id and provide the instance IDs in the instances array. Set action to add.
$ curl "https://api.vultr.com/v2/clusters/{cluster-id}" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"action": "add",
"instances": [
"INSTANCE-ID-1",
"INSTANCE-ID-2"
]
}'
A successful request returns an HTTP 202 Accepted response.
Send a GET request to the Get Cluster endpoint to retrieve the cluster details. Replace {cluster-id} with the cluster id.
$ curl "https://api.vultr.com/v2/clusters/{cluster-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Verify that the added instances appear in the cluster's instance list.
Send a POST request to the Add Single Instance endpoint to add a single instance to the cluster. Replace {cluster-id} with the cluster id and {instance-id} with the instance id.
$ curl "https://api.vultr.com/v2/clusters/{cluster-id}/add/{instance-id}" \
-X POST \
-H "Authorization: Bearer ${VULTR_API_KEY}"
A successful request returns an HTTP 202 Accepted response.
Send a GET request to the Get Cluster endpoint to retrieve the cluster details.
$ curl "https://api.vultr.com/v2/clusters/{cluster-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Verify that the instance appears in the cluster's instance list.