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

# Cluster Commands

> CLI reference for cluster management

Manage your GPU clusters with the `tp cluster` command group.

Subcommands: `create`, `destroy` (alias: `rm`), `list` (alias: `ls`), `info`, `edit`, `attach`, `detach`.

## tp cluster create

Deploy a new GPU cluster.

```bash theme={null}
tp cluster create <instance_type> [options]
```

### Arguments

* `instance_type` - Instance type to deploy (see [Instance Types](/resources/instance-types))

### Optional Arguments

* `-i, --public-key` - Path to your public SSH key (e.g., `~/.ssh/id_ed25519.pub`). Optional if SSH keys have been saved on your account (see `tp me sshkey`).
* `--name` - Custom cluster name
* `-n, --num-nodes` - Number of nodes (required for multi-node clusters)
* `--container` - Container image to run on cluster nodes. Available images: `base`, `pytorch`. See [Container Images](/features/clusters#container-images)
* `--deletion-protection` - Enable deletion protection for the cluster
* `--wait` - Wait for the cluster to be fully provisioned before returning

### Examples

```bash theme={null}
# Single H100 (with SSH key already saved on account)
tp cluster create 1xH100

# Single H100 (providing SSH key explicitly)
tp cluster create 1xH100 -i ~/.ssh/id_ed25519.pub

# Single node with 8x B200
tp cluster create 8xB200
# 4-node cluster with 8xB200 each (32 GPUs)
tp cluster create 8xB200 -n 4

# Create with a PyTorch container image
tp cluster create 1xH100 --container pytorch

# Create with deletion protection and wait for provisioning
tp cluster create 8xH200 --name "production" --deletion-protection --wait
```

## tp cluster list

View all your clusters. Alias: `tp cluster ls`.

```bash theme={null}
tp cluster list [--org] [--instances]
```

### Optional Arguments

* `--org, --organization` - List all clusters in your organization
* `--instances` - Show all instances across clusters

### Example

```bash theme={null}
# List your clusters
tp cluster list

# List all organization clusters
tp cluster list --org

# Show all instances across clusters
tp cluster list --instances
```

## tp cluster info

Get detailed information about a specific cluster.

```bash theme={null}
tp cluster info <cluster_id>
```

### Arguments

* `cluster_id` - The ID of the cluster to inspect

### Example

```bash theme={null}
tp cluster info c-abc123
```

## tp cluster destroy

Terminate and delete a cluster. Alias: `tp cluster rm`.

```bash theme={null}
tp cluster destroy <cluster_id> [options]
```

### Arguments

* `cluster_id` - The ID of the cluster to destroy

### Optional Arguments

* `--no-input` - Skip confirmation prompt and destroy the cluster immediately
* `--wait` - Wait for the cluster to be fully destroyed before returning

### Example

```bash theme={null}
# Destroy a cluster (will prompt for confirmation)
tp cluster destroy c-abc123

# Destroy without confirmation prompt
tp cluster destroy c-abc123 --no-input

# Destroy and wait until fully terminated
tp cluster destroy c-abc123 --wait
```

<Warning>
  This action is irreversible. Make sure to back up any important data before destroying a cluster.
</Warning>

## tp cluster edit

Edit cluster settings.

```bash theme={null}
tp cluster edit <cluster_id> [options]
```

### Arguments

* `cluster_id` - The ID of the cluster to edit

### Optional Arguments

* `--name` - New name for the cluster
* `--deletion-protection` - Enable/disable deletion protection (true/false)

### Example

```bash theme={null}
tp cluster edit c-abc123 --name "new-cluster-name"
```

## tp cluster attach

Attach a storage volume to a cluster.

```bash theme={null}
tp cluster attach <cluster_id> <storage_id> [options]
```

### Arguments

* `cluster_id` - The ID of the cluster to attach storage to
* `storage_id` - The ID of the storage volume to attach

### Optional Arguments

* `--wait` - Wait for storage to be fully attached

### Example

```bash theme={null}
# Attach storage
tp cluster attach c-abc123 s-xyz789

# Attach and wait until ready
tp cluster attach c-abc123 s-xyz789 --wait
```

<Note>
  Storage volumes can be attached to CPU instances and multi-node clusters (2+ nodes).
</Note>

## tp cluster detach

Detach a storage volume from a cluster.

```bash theme={null}
tp cluster detach <cluster_id> <storage_id> [options]
```

### Arguments

* `cluster_id` - The ID of the cluster to detach storage from
* `storage_id` - The ID of the storage volume to detach

### Optional Arguments

* `--wait` - Wait for storage to be fully detached

### Example

```bash theme={null}
# Detach storage
tp cluster detach c-abc123 s-xyz789

# Detach and wait until complete
tp cluster detach c-abc123 s-xyz789 --wait
```

## Next Steps

* Learn about [instance types](/resources/instance-types)
* Explore [multi-node training](/guides/multi-node-training)
* See [cluster management](/features/clusters) concepts
