---
title: How to Create a Cluster Using an Instance Template
url: https://docs.vultr.com/products/compute/clusters/create-from-template
description: Create a Vultr cluster from an existing instance template using the API for consistent, repeatable instance deployments.
publish_date: 2026-10-27T21:32:41.446871Z
last_updated: 2026-10-28T17:02:52.986233Z
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

Instance templates define a reusable blueprint for instances, including the plan, OS, and SSH keys. Using a template when creating a cluster ensures consistent deployments and simplifies scaling.

This guide explains how to create a cluster from an existing instance template using the Vultr API. To create a cluster by specifying a plan directly, see [How to Create a Cluster](https://docs.vultr.com/products/compute/clusters/create).

1. Send a `GET` request to the [**List Instance Templates** endpoint](https://www.vultr.com/api/#tag/instance-templates/operation/list-instance-templates) to retrieve all available templates. If you do not have a template, create one by following the instructions in [How to Create an Instance Template](https://docs.vultr.com/products/compute/clusters/instance-templates/create).

    ```console
    $ curl "https://api.vultr.com/v2/instances/templates" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    ```

    Note the `id` of the template you want to use.

1. Send a `POST` request to the [**Create Cluster** endpoint](https://www.vultr.com/api/#tag/clusters/operation/create-cluster) to create a new cluster using the template. Replace `REGION` with the region identifier, `TEMPLATE_ID` with the instance template's ID, `CLUSTER_LABEL` with a descriptive name, and `HOSTNAME` with a hostname for the cluster's instances. Do not include a `plan` field alongside `instance_template`. The request accepts either one. Whether the cluster is a Compute Cluster or a Bare Metal Cluster is inferred from the template's plan and cannot be set directly. Set `gpu_fabric` to `true` to create a GPU Fabric Cluster. The `desired_pool_count` must be equal to or greater than `min_pool_count`.

    ```console
    $ curl "https://api.vultr.com/v2/clusters" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "region": "REGION",
            "instance_template": "TEMPLATE_ID",
            "label": "CLUSTER_LABEL",
            "min_pool_count": 2,
            "desired_pool_count": 2,
            "hostname": "HOSTNAME",
            "notify_activate": true
        }'
    ```

    A successful request returns an HTTP `200 OK` response with the cluster details, including the inferred `type`. Note the cluster `id` for future operations.

    > [!NOTE]
    > Attach an existing Vultr File Storage (VFS) subscription with `vfs.ids`, or provision a new one inline with `vfs.create`. A VFS subscription must be in the same region as the cluster.

1. Optionally, add a head node to the cluster by including `use_head_node` and `head_node_plan` in the request body. Replace `HEAD_NODE_PLAN` with the compute plan for the head node. The head node needs its own image source, since the compute nodes' image sources come from `TEMPLATE_ID` rather than a top-level `os_id`. Provide one in a `head_node_template` object, or reference an existing instance template by setting `head_node_template` to its ID directly.

    ```console
    $ curl "https://api.vultr.com/v2/clusters" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        -d '{
            "region": "REGION",
            "instance_template": "TEMPLATE_ID",
            "label": "CLUSTER_LABEL",
            "min_pool_count": 2,
            "desired_pool_count": 2,
            "hostname": "HOSTNAME",
            "notify_activate": true,
            "use_head_node": true,
            "head_node_plan": "HEAD_NODE_PLAN",
            "head_node_template": {
                "os_id": OS_ID
            }
        }'
    ```

    The response includes a `head_node_instance_template_id` and one additional instance labeled `Cluster Head Node`, with hostname `HOSTNAME-head-node`. The head node does not count toward `desired_pool_count`.

1. Send a `GET` request to the [**Get Cluster** endpoint](https://www.vultr.com/api/#tag/clusters/operation/get-cluster) to retrieve the cluster details. Replace `{cluster-id}` with the ID from the previous step.

    ```console
    $ curl "https://api.vultr.com/v2/clusters/{cluster-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    ```

    Verify that `state` progresses from `empty` to `active` as instances are provisioned.
