---
# Generated by kapten-docs from the CLI's command tree. DO NOT EDIT.
title: "kapten clusters"
description: "Connect and manage Kubernetes clusters."
sidebar:
  label: "clusters"
---

Every command takes the [global flags](/cli/reference#global-flags).

## kapten clusters create

Connects a Kubernetes cluster from its kubeconfig. Kapten then installs its agent on the cluster.

```bash
kapten clusters create <body...> [flags]
```

| Argument | Description |
| --- | --- |
| `body...` | The request body, as shorthand or JSON. See [Request bodies](/cli/request-bodies). |

| Flag | Description |
| --- | --- |
| `--rsh-generate-body` | Print an example request body and exit |
| `--rsh-validate` | Validate the JSON request body against the OpenAPI schema before sending |

Request body fields, `*` for required:

```text
{
  cloud_provider*: (string enum:custom,aws,gcp) The cloud provider for the cluster.
  kube_config*: (string format:byte) The base64-encoded Kubernetes configuration for the cluster.
  name*: (string pattern:\S minLen:1) The name of the cluster.
}
```

Example:

```bash
kapten clusters create 'cloud_provider: aws, kube_config: @file, name: my-production-cluster'
```

## kapten clusters delete

Removes a cluster from the organization.

```bash
kapten clusters delete <cluster-id> [flags]
```

| Argument | Description |
| --- | --- |
| `cluster-id` | The unique identifier of the cluster |

Example:

```bash
kapten clusters delete <cluster-id>
```

## kapten clusters get

Returns a cluster.

```bash
kapten clusters get <cluster-id> [flags]
```

| Argument | Description |
| --- | --- |
| `cluster-id` | The unique identifier of the cluster |

Example:

```bash
kapten clusters get <cluster-id>
```

## kapten clusters list

Returns the organization's clusters, a page at a time.

```bash
kapten clusters list [flags]
```

| Flag | Description |
| --- | --- |
| `--filter-with-deleted` | Include deleted instances (default: false) |
| `--page-limit int` | Maximum number of records to return (default: 10) |
| `--page-number int` | Page number (default: 1) |

Example:

```bash
kapten clusters list
```

## kapten clusters update

Updates a cluster's settings.

```bash
kapten clusters update <cluster-id> <body...> [flags]
```

| Argument | Description |
| --- | --- |
| `cluster-id` | The unique identifier of the cluster |
| `body...` | The request body, as shorthand or JSON. See [Request bodies](/cli/request-bodies). |

| Flag | Description |
| --- | --- |
| `--rsh-generate-body` | Print an example request body and exit |
| `--rsh-validate` | Validate the JSON request body against the OpenAPI schema before sending |

Request body fields, `*` for required:

```text
{
  kube_config: (string format:byte) The base64-encoded Kubernetes configuration for the cluster.
  name: (string pattern:\S minLen:1) The name of the cluster.
}
```

Example:

```bash
kapten clusters update <cluster-id> 'kube_config: @file, name: my-production-cluster'
```
