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

# Clusters

> Manage clusters and download kubeconfigs

**Alias:** `cnap cl`

## List clusters

```bash theme={null}
cnap clusters list
```

## Get cluster details

```bash theme={null}
cnap clusters get <cluster-id>
```

## Update a cluster

```bash theme={null}
cnap clusters update <cluster-id> --name "staging"
cnap clusters update <cluster-id> --region <region-id>
```

| Flag       | Description      |
| ---------- | ---------------- |
| `--name`   | New cluster name |
| `--region` | New region ID    |

## Delete a cluster

```bash theme={null}
cnap clusters delete <cluster-id> --force
```

The `--force` flag is required to confirm deletion.

## Download kubeconfig

```bash theme={null}
# Print to stdout
cnap clusters kubeconfig <cluster-id>

# Write to file (mode 0600)
cnap clusters kubeconfig <cluster-id> -o kubeconfig.yaml
```

Downloads the admin kubeconfig for a KaaS-managed cluster. The cluster must be in RUNNING status.

<Tip>
  Pipe directly into kubectl: `cnap clusters kubeconfig <id> | kubectl --kubeconfig /dev/stdin get nodes`
</Tip>
