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

# kubox cluster connect

Write a kubeconfig for a cluster

### Synopsis

Add a cluster to your kubeconfig so you can access it with kubectl.
A kubeconfig file stores your Kubernetes connection settings.

Run kubox login first. KUBOX\_TOKEN alone cannot be used for this command.
Your kubectl access uses your Kubox session. Sign in again when the session expires.

```
kubox cluster connect [flags]
```

### Options

```
      --cluster-name string   Cluster to connect to
      --context string        Name for the context, defaulting to the cluster's name
  -h, --help                  help for connect
      --kubeconfig string     Kubeconfig to write to (env: KUBECONFIG, default ~/.kube/config)
```

### Global options

See [global options](/cli-reference/kubox#global-options).

### SEE ALSO

* [kubox cluster](/cli-reference/kubox_cluster)	 - Work with clusters a management plane manages
