> ## Documentation Index
> Fetch the complete documentation index at: https://gcore.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage a Bare Metal GPU cluster

export const MethodSection = ({children}) => children ?? null;

export const MethodSwitch = ({children}) => {
  const tabs = React.Children.toArray(children).map(c => {
    if (!c || !c.props) return null;
    if (c.props.id) return c;
    const inner = c.props.children;
    if (inner && inner.props && inner.props.id) return inner;
    return null;
  }).filter(Boolean);
  const firstId = tabs.length > 0 ? tabs[0].props.id : "";
  const [active, setActive] = React.useState(firstId);
  React.useEffect(() => {
    try {
      const saved = localStorage.getItem("gcore_docs_method");
      if (saved && tabs.find(t => t.props.id === saved)) {
        setActive(saved);
      }
    } catch (_) {}
  }, []);
  React.useEffect(() => {
    try {
      document.querySelectorAll("h2[id], h3[id]").forEach(heading => {
        const visible = heading.offsetParent !== null;
        document.querySelectorAll(`a[href="#${heading.id}"]`).forEach(link => {
          if (link.closest("h1,h2,h3,h4,h5,h6")) return;
          const li = link.closest("li");
          if (li) li.style.display = visible ? "" : "none";
        });
      });
    } catch (_) {}
    window.dispatchEvent(new Event("scroll"));
  }, [active]);
  const handleClick = id => {
    setActive(id);
    try {
      localStorage.setItem("gcore_docs_method", id);
    } catch (_) {}
  };
  return <div>
      <div className="not-prose flex gap-0 border-b border-zinc-200 dark:border-zinc-800 mb-8 mt-2" role="tablist">
        {tabs.map(tab => {
    const isActive = active === tab.props.id;
    return <button key={tab.props.id} role="tab" aria-selected={isActive} onClick={() => handleClick(tab.props.id)} className={["px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors cursor-pointer", isActive ? "border-primary text-primary" : "border-transparent text-zinc-500 hover:text-zinc-800 dark:hover:text-zinc-200"].join(" ")}>
              {tab.props.label}
            </button>;
  })}
      </div>

      {tabs.map(tab => <div key={tab.props.id} style={{
    display: active === tab.props.id ? "" : "none"
  }}>
          {tab.props.children}
        </div>)}
    </div>;
};

<MethodSwitch>
  <MethodSection id="portal" label="Customer Portal">
    After creating a GPU cluster, use the cluster details page to monitor nodes, resize the cluster, manage power state, configure network interfaces, and delete cluster resources.

    ## Access cluster details

    To view and manage an existing cluster, open the cluster details page.

    1. In the [Gcore Customer Portal](https://portal.gcore.com), navigate to **GPU Cloud**.
    2. In the sidebar, expand **GPU Clusters** and select **Bare Metal GPU Clusters**.
    3. Click on a cluster name to open the details page.

    The cluster details page displays summary information in the header panel:

    | Field      | Description                                                                                                  |
    | ---------- | ------------------------------------------------------------------------------------------------------------ |
    | Cluster ID | Unique identifier for the cluster                                                                            |
    | Pkey ID    | InfiniBand Partition Key ID. Displayed as "-" if InfiniBand is not configured or during cluster provisioning |
    | OS Distro  | Operating system image installed on all nodes                                                                |
    | Status     | Current cluster state                                                                                        |
    | Region     | Data center location                                                                                         |
    | Plan       | Monthly pricing plan for the cluster                                                                         |

    The page is organized into tabs: **Overview**, **Power**, **Networking**, **Tags**, **User Actions**, and **Delete**.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-overview.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=4891aaa4700064cf25a7611e103c61f3" alt="Cluster overview page showing header panel and tabs" width="1321" height="540" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-overview.png" />
    </Frame>

    ## View cluster nodes

    The **Overview** tab lists all nodes (servers) in the cluster. Each node entry shows the node name, flavor, assigned IP addresses, status, timestamps, cost, and other metadata. The table supports filtering by name, date range, and status.

    <Info>
      All nodes in a cluster share the same configuration (image, network settings, file shares) defined at cluster creation. Network interfaces and file shares cannot be changed at the node level after creation. The OS image and SSH key can be updated cluster-wide using the Rebuild operation.
    </Info>

    ## Resize a cluster

    Cluster size can be adjusted after creation by adding or removing nodes.

    To resize a cluster:

    1. On the **Overview** tab, click **Resize Cluster**.
    2. Adjust the instance count using the **+** and **-** buttons.
    3. Click **Resize**.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-resize-dialog.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=bc721be1b530d8037fac2aeea715f9de" alt="Resize cluster dialog with instance count controls" width="480" height="373" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-resize-dialog.png" />
    </Frame>

    New nodes inherit the cluster's original configuration defined at creation time. The maximum number of nodes is limited by the current stock availability in the selected region.

    <Info>
      While a cluster is in the Resizing state, most management actions are unavailable. Bare Metal GPU nodes, especially H100 configurations, may take 15–40 minutes to provision.
    </Info>

    <Warning>
      Scaling down to zero nodes is not allowed and returns an error. A cluster must contain at least one node. To remove the cluster entirely, use the **Delete** tab.
    </Warning>

    <Warning>
      When scaling down, the system removes a random node from the cluster. To delete a specific node, use the per-node delete action instead of resize.
    </Warning>

    ### Delete a specific node

    To remove a specific node without random selection:

    1. Locate the node in the cluster list.
    2. Click the actions menu (three dots) on the node row.
    3. Select **Delete**.
    4. Confirm the deletion.

    <Warning>
      Deleting the last node in a cluster automatically deletes the entire cluster. This applies to both UI and API/Terraform operations. When using the API or Terraform to delete nodes, no warning is displayed before the cluster is removed. Leave at least one node in the cluster to preserve it.
    </Warning>

    ## Power actions

    Power actions control the running state of cluster nodes. Actions can be applied to individual nodes or in bulk.

    ### Individual node actions

    To control a single node:

    1. Locate the node in the cluster list.
    2. Click the actions menu (three dots) on the node row.
    3. Select the desired action:
       * **Power on**: Start the node
       * **Power off**: Shut down the node
       * **Soft reboot**: Graceful restart of the operating system
       * **Hard reboot**: If soft reboot fails, force restart the node
       * **Rebuild**: Reinstall the OS on the node using the image configured for the cluster. All data on local storage is deleted. To rebuild with a different image or SSH key, use the [GPU Bare Metal API](/api-reference/cloud/gpu-bare-metal/rebuild-bare-metal-gpu-cluster-server): first update the cluster server settings, then trigger the rebuild.
       * **Replace**: Delete the current node and provision a new one with the same configuration (flavor, image, network settings). Available in the UI and via the [Replace bare metal GPU cluster server](/api-reference/cloud/gpu-bare-metal/replace-bare-metal-gpu-cluster-server) API endpoint. Use this to recover a node stuck in a failed state without changing the cluster setup.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/node-actions-menu.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=9683a23d4a0a8b2413bafba7df26dc11" alt="Node actions menu showing power and management options" width="1603" height="881" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/node-actions-menu.png" />
    </Frame>

    ### Bulk actions

    To apply actions to multiple nodes simultaneously:

    1. Select nodes using the checkboxes in the nodes table.
    2. Click **Group actions** in the toolbar.
    3. Select the action to apply to all selected nodes.

    Alternatively, use the **Power** tab to perform soft or hard reboot on all cluster nodes at once.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-power-tab.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=c3b578da58113de66d56f85c9cb15445" alt="Power tab with soft and hard reboot options" width="1321" height="509" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-power-tab.png" />
    </Frame>

    ## Network interfaces

    The **Networking** tab displays network interfaces for each node.

    Click on a node name to expand its interface details.

    Interface types include:

    | Type       | Description                                                             |
    | ---------- | ----------------------------------------------------------------------- |
    | Public     | External IP address for internet access                                 |
    | Private    | Internal network for communication with other cloud resources           |
    | InfiniBand | High-speed, low-latency inter-node network for GPU-to-GPU communication |

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-networking-tab.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=284bfa463f43c9a8d749d60187728cc0" alt="Networking tab showing node and interface list" width="1090" height="624" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-networking-tab.png" />
    </Frame>

    For flavors with InfiniBand, multiple InfiniBand interfaces are created automatically (by default, 8 for H100 configurations). These appear as "GPU-cluster ib-subnet" entries in the interface list.

    Click on an interface to expand its details, including IP address, network configuration, and other network information.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-network-interfaces.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=908c1e960073fc51fcd2e41b2c8ab90e" alt="Node with expanded interface showing network details" width="1279" height="761" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-network-interfaces.png" />
    </Frame>

    ### Modify network interfaces

    To add network interfaces on a specific node:

    1. Navigate to the **Networking** tab.
    2. Click on a node to expand its details.
    3. Click **Add Interface** or **Add Sub-Interface**.
    4. Configure the interface type (public or private) and IP allocation settings as supported by the service.

    <Info>
      Only network interfaces can be modified on individual nodes after cluster creation. Image and storage configuration cannot be changed at the node level. InfiniBand interfaces are managed automatically and cannot be modified or deleted.
    </Info>

    ## Tags

    Tags are key-value pairs used to organize and categorize clusters. Tags are applied at the cluster level and inherited by all nodes.

    To manage tags:

    1. Navigate to the **Tags** tab on the cluster details page.
    2. Enable the **Add custom tags** checkbox.
    3. Enter the key and value for each tag.
    4. Click **Save changes**.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-tags-tab.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=02d8825b85b3e481c6026d9f7b7b166c" alt="Tags tab with custom tags toggle" width="1321" height="462" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-tags-tab.png" />
    </Frame>

    Use tags for billing allocation, environment identification, or organizational purposes.

    <Info>
      Tags can be modified even while the cluster is in the Resizing state, unlike most other management actions.
    </Info>

    ## User actions

    The **User Actions** tab displays a log of all operations performed on the cluster, including creation, deletion, resize, power, and network actions.

    Use the date and action type filters to narrow results.

    This log is useful for auditing and troubleshooting.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-user-actions-tab.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=6a651612bfb4e1578b88638301eeb9fc" alt="User Actions tab showing audit log of cluster operations" width="1321" height="513" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-user-actions-tab.png" />
    </Frame>

    ## Console access

    For troubleshooting or when SSH access is unavailable, use the browser-based console.

    1. In the **Overview** tab, locate the target node.
    2. Click **Open Console** in the node row.
    3. The console opens in a new browser tab using noVNC.
    4. Log in with the same credentials used for SSH access.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-console.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=9880f584731699fa089d10d29cdbb65e" alt="Browser-based noVNC console with login prompt" width="852" height="98" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-console.png" />
    </Frame>

    The console provides direct terminal access to the node, useful when network connectivity issues prevent SSH access.

    ## Delete a cluster

    When a cluster is deleted, local NVMe storage is permanently erased; file shares and object storage remain intact.

    To delete a cluster:

    1. Navigate to the **Delete** tab on the cluster details page.
    2. Click **Delete Cluster**.
    3. Confirm the deletion.

    <Frame>
      <img src="https://mintcdn.com/gcore/uiRa_jFs2CEr69p9/images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-delete-tab.png?fit=max&auto=format&n=uiRa_jFs2CEr69p9&q=85&s=3417351838aaae5eac3cc6b06a0daa8a" alt="Delete tab with warning message and delete button" width="1321" height="320" data-path="images/docs/edge-ai/ai-infrastructure/manage-a-bare-metal-gpu-cluster/cluster-delete-tab.png" />
    </Frame>

    <Warning>
      Cluster deletion is irreversible. Data on local NVMe storage cannot be recovered.
    </Warning>

    <p>The Customer Portal is suitable for managing individual clusters. For automated workflows — CI/CD pipelines, infrastructure-as-code, or batch provisioning — use the [GPU Bare Metal API](/api-reference/cloud/gpu-bare-metal) instead.</p>
  </MethodSection>

  <MethodSection id="api" label="REST API">
    <p>Use the REST API to inspect clusters, resize them, manage node lifecycle operations, and automate cluster administration workflows.</p>

    <Info>
      An [API token](/account-settings/api-tokens) is required, along with a
      [project ID](/api-reference/cloud#tag/Projects/operation/ProjectsListV1.get)
      and a [region ID](/api-reference/cloud#tag/Regions/operation/RegionListV1.get).
    </Info>

    <p>Open a terminal and set these environment variables before running the examples:</p>

    ```bash theme={null}
    export GCORE_API_KEY="{YOUR_API_KEY}"
    export GCORE_CLOUD_PROJECT_ID="{YOUR_PROJECT_ID}"
    export GCORE_CLOUD_REGION_ID="{YOUR_REGION_ID}"
    ```

    ## List bare metal GPU clusters

    <p>The list endpoint returns all clusters in a project and region. Use query filters to narrow results — multiple filters are ANDed, so a cluster must match all specified conditions.</p>

    <p>Available filters:</p>

    | Filter          | Operators                               | Description                                                                                                     |
    | --------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
    | `ids`           | —                                       | Return clusters with specific IDs. Repeat the parameter for multiple values: `ids=uuid1&ids=uuid2`              |
    | `name`          | `contains`, `exact`, `prefix`, `suffix` | Match cluster name (case-insensitive)                                                                           |
    | `flavor`        | `contains`, `exact`, `prefix`, `suffix` | Match flavor name (case-insensitive)                                                                            |
    | `image_ids`     | —                                       | Return clusters provisioned with specific image IDs. Repeat for multiple values                                 |
    | `servers_count` | `gte`, `lte`, `gt`, `lt`                | Filter by node count                                                                                            |
    | `managed_by`    | —                                       | Return clusters by management type. Accepted values: `user` (directly managed) or `k8s` (managed by Kubernetes) |
    | `created_at`    | `gt`, `gte`, `lt`, `lte`                | Filter by creation time (UTC ISO 8601)                                                                          |
    | `updated_at`    | `gt`, `gte`, `lt`, `lte`                | Filter by last-update time (UTC ISO 8601)                                                                       |
    | `tags`          | `[key]=value`                           | Exact tag key-value pair. Multiple pairs are ANDed; values match case-insensitively                             |
    | `tag_key`       | `contains`, `exact`, `prefix`, `suffix` | Match tag key regardless of value                                                                               |
    | `tag_value`     | `contains`, `exact`, `prefix`, `suffix` | Match tag value regardless of key                                                                               |

    <Info />

    <Info>
      The Python and Go SDKs support `limit` and `offset` for pagination only. Name, flavor, node count, tag, image, and date filters are available via curl only.
    </Info>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        page = client.cloud.gpu_baremetal.clusters.list(
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        for cluster in page.results:
            print(cluster.id, cluster.name, cluster.servers_count, cluster.status)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            gcore "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            page, err := client.Cloud.GPUBaremetal.Clusters.List(context.TODO(),
                cloud.GPUBaremetalClusterListParams{
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("Total: %d\n", len(page.Results))
            for _, c := range page.Results {
                fmt.Printf("  %s  %s  nodes=%d\n", c.ID, c.Name, c.ServersCount)
            }
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -G "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters" \
          -H "Authorization: APIKey ${GCORE_API_KEY}" \
          --data-urlencode "name[prefix]=prod-" \
          --data-urlencode "flavor[prefix]=bm3-" \
          --data-urlencode "servers_count[gte]=4" \
          --data-urlencode "tags[env]=production"
        ```

        Response:

        ```json theme={null}
        {
          "count": 1,
          "results": [
            {
              "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "name": "prod-bm-cluster-1",
              "status": "active",
              "flavor": "bm3-ai-1xlarge-h100-80-8",
              "tags": [
                { "key": "env", "value": "production", "read_only": false },
                { "key": "team", "value": "ml", "read_only": false }
              ],
              "servers_count": 4,
              "created_at": "2026-06-10T12:00:00Z",
              "updated_at": "2026-06-10T12:15:00Z",
              "servers_ids": [
                "server-uuid-1",
                "server-uuid-2",
                "server-uuid-3",
                "server-uuid-4"
              ],
              "has_pending_changes": false
            }
          ]
        }
        ```

        Use `limit` and `offset` for pagination. The default page size is 10; the maximum is 1000.
      </Tab>
    </Tabs>

    ## Get cluster details

    <p>Returns the full configuration and current status of a single cluster.</p>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        cluster = client.cloud.gpu_baremetal.clusters.get(
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        print(cluster.id, cluster.name, cluster.status, cluster.servers_count)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            cluster, err := client.Cloud.GPUBaremetal.Clusters.Get(context.TODO(),
                "{CLUSTER_ID}",
                cloud.GPUBaremetalClusterGetParams{
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%s  %s  nodes=%d\n", cluster.ID, cluster.Name, cluster.ServersCount)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "prod-bm-cluster-1",
          "status": "active",
          "flavor": "bm3-ai-1xlarge-h100-80-8",
          "servers_count": 4,
          "servers_ids": ["server-uuid-1", "server-uuid-2", "server-uuid-3", "server-uuid-4"],
          "tags": [{ "key": "env", "value": "production" }],
          "created_at": "2026-06-10T12:00:00Z",
          "updated_at": "2026-06-10T12:15:00Z",
          "has_pending_changes": false
        }
        ```
      </Tab>
    </Tabs>

    ## Resize a cluster

    <p>Change the node count by specifying the new total number of nodes. Scaling down removes a random node; to delete a specific node, use the [Delete a specific node](#delete-a-specific-node) endpoint instead.</p>

    <Warning>
      Scaling down to zero is not allowed. A cluster must contain at least one node at all times.
    </Warning>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.resize(
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
            instances_count=4,
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Resize(context.TODO(),
                "{CLUSTER_ID}",
                cloud.GPUBaremetalClusterResizeParams{
                    ProjectID:      gcore.Int(projectID),
                    RegionID:       gcore.Int(regionID),
                    InstancesCount: 4,
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X POST \
          "https://api.gcore.com/cloud/v1/ai/clusters/gpu/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/{CLUSTER_ID}/resize" \
          -H "Authorization: APIKey ${GCORE_API_KEY}" \
          -H "Content-Type: application/json" \
          -d '{"instances_count": 4}'
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`. Bare Metal H100 nodes may take 15–40 minutes to provision.
      </Tab>
    </Tabs>

    ## Control cluster power state

    <p>The `action` endpoint applies a power operation to all nodes in the cluster simultaneously.</p>

    | Action        | Description                          |
    | ------------- | ------------------------------------ |
    | `start`       | Power on all nodes                   |
    | `stop`        | Power off all nodes                  |
    | `soft_reboot` | Send ACPI shutdown signal and reboot |
    | `hard_reboot` | Force-reset all nodes immediately    |

    <Info>
      The Python and Go SDKs (v0.48.0) do not expose the cluster action endpoint directly. Use the curl tab below.
    </Info>

    <Tabs>
      <Tab title="curl">
        ```bash theme={null}
        # Replace "soft_reboot" with "start", "stop", or "hard_reboot"
        curl -X POST \
          "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}/action" \
          -H "Authorization: APIKey ${GCORE_API_KEY}" \
          -H "Content-Type: application/json" \
          -d '{"action": "soft_reboot"}'
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`.
      </Tab>
    </Tabs>

    ## Rebuild a cluster

    <p>Reinstalls the OS on all nodes in the cluster using the image currently configured for the cluster. All local storage data is erased.</p>

    <Info>
      To rebuild with a different image or SSH key, first update the cluster server settings with `PATCH /cloud/v3/gpu/baremetal/{project_id}/{region_id}/clusters/{cluster_id}/servers_settings`, then trigger the rebuild.
    </Info>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.rebuild(
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Rebuild(context.TODO(),
                "{CLUSTER_ID}",
                cloud.GPUBaremetalClusterRebuildParams{
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X POST \
          "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}/rebuild" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`. Rebuilding all nodes may take 15–40 minutes.
      </Tab>
    </Tabs>

    ## Rebuild a specific node

    <p>Reinstalls the OS on a single node without affecting other nodes in the cluster. All local storage on the node is erased.</p>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.servers.rebuild(
            server_id="{SERVER_ID}",
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Servers.Rebuild(context.TODO(),
                "{SERVER_ID}",
                cloud.GPUBaremetalClusterServerRebuildParams{
                    ClusterID: "{CLUSTER_ID}",
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X POST \
          "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}/servers/{SERVER_ID}/rebuild" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`.
      </Tab>
    </Tabs>

    ## Replace a specific node

    <p>Deletes a node and provisions a new one with the same configuration. Use this to recover a node stuck in a failed state without changing the cluster setup.</p>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.servers.replace(
            server_id="{SERVER_ID}",
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Servers.Replace(context.TODO(),
                "{SERVER_ID}",
                cloud.GPUBaremetalClusterServerReplaceParams{
                    ClusterID: "{CLUSTER_ID}",
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X POST \
          "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}/servers/{SERVER_ID}/replace" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`.
      </Tab>
    </Tabs>

    ## Delete a specific node

    <p>Removes a single node by ID. If deleting the last node in the cluster, the entire cluster is removed — no confirmation prompt is shown through the API.</p>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.servers.delete(
            instance_id="{SERVER_ID}",
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Servers.Delete(context.TODO(),
                "{SERVER_ID}",
                cloud.GPUBaremetalClusterServerDeleteParams{
                    ClusterID: "{CLUSTER_ID}",
                    ProjectID: gcore.Int(projectID),
                    RegionID:  gcore.Int(regionID),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X DELETE \
          "https://api.gcore.com/cloud/v1/ai/clusters/gpu/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/{CLUSTER_ID}/node/{SERVER_ID}" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`.
      </Tab>
    </Tabs>

    ## Delete a cluster

    <p>Deletes the cluster and all its nodes. Local NVMe storage is permanently erased. File shares and object storage remain intact. Pass `all_floating_ips=true` to release any floating IPs, and `all_reserved_fixed_ips=true` to release reserved fixed IPs.</p>

    <Warning>
      Cluster deletion is irreversible. Data on local NVMe storage cannot be recovered.
    </Warning>

    <Tabs>
      <Tab title="Python SDK">
        ```python theme={null}
        import os
        from gcore import Gcore

        client = Gcore(api_key=os.environ.get("GCORE_API_KEY"))

        task_id_list = client.cloud.gpu_baremetal.clusters.delete(
            cluster_id="{CLUSTER_ID}",
            project_id=int(os.environ["GCORE_CLOUD_PROJECT_ID"]),
            region_id=int(os.environ["GCORE_CLOUD_REGION_ID"]),
            all_floating_ips=True,
            all_reserved_fixed_ips=True,
        )
        print(task_id_list.tasks)
        ```
      </Tab>

      <Tab title="Go SDK">
        ```go theme={null}
        package main

        import (
            "context"
            "fmt"
            "os"
            "strconv"

            "github.com/G-Core/gcore-go"
            "github.com/G-Core/gcore-go/cloud"
            "github.com/G-Core/gcore-go/option"
        )

        func main() {
            projectID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_PROJECT_ID"), 10, 64)
            regionID, _ := strconv.ParseInt(os.Getenv("GCORE_CLOUD_REGION_ID"), 10, 64)

            client := gcore.NewClient(option.WithAPIKey(os.Getenv("GCORE_API_KEY")))

            taskIDList, err := client.Cloud.GPUBaremetal.Clusters.Delete(context.TODO(),
                "{CLUSTER_ID}",
                cloud.GPUBaremetalClusterDeleteParams{
                    ProjectID:           gcore.Int(projectID),
                    RegionID:            gcore.Int(regionID),
                    AllFloatingIPs:      gcore.Bool(true),
                    AllReservedFixedIPs: gcore.Bool(true),
                })
            if err != nil {
                panic(err)
            }
            fmt.Printf("%+v\n", taskIDList.Tasks)
        }
        ```
      </Tab>

      <Tab title="curl">
        ```bash theme={null}
        curl -X DELETE \
          "https://api.gcore.com/cloud/v3/gpu/baremetal/${GCORE_CLOUD_PROJECT_ID}/${GCORE_CLOUD_REGION_ID}/clusters/{CLUSTER_ID}?all_floating_ips=true&all_reserved_fixed_ips=true" \
          -H "Authorization: APIKey ${GCORE_API_KEY}"
        ```

        Response:

        ```json theme={null}
        { "tasks": ["task-uuid"] }
        ```

        Poll `GET /cloud/v1/tasks/{task_id}` every 5 seconds until `state` is `FINISHED`.
      </Tab>
    </Tabs>
  </MethodSection>
</MethodSwitch>
