# Connect to a Kubernetes cluster

> Learn how to connect to a Kubernetes cluster using CubeCMP.

## Kubernetes usage and connection overview {#kubernetes-usage-and-connection-overview}

Once a Kubernetes cluster is created, you can connect and interact with cluster resources by downloading the Kubernetes configuration file from the CubeCMP Kubernetes cluster management interface.

## Obtain the Kubernetes configuration file and connect to a Kubernetes cluster {#obtain-the-kubernetes-configuration-file-and-connect-to-a-kubernetes-cluster}

### Prerequisites {#prerequisites}

- Ensure your endpoint has the `kubectl` package installed.

  **kubectl** is the command-line tool for managing Kubernetes clusters. It is required to interact with your Kubernetes cluster resources. For installation instructions, see **[Install Tools](https://kubernetes.io/docs/tasks/tools/)**. To learn more about **kubectl**, see **[kubectl documentation](https://kubernetes.io/docs/reference/kubectl/kubectl/)**.

### Download the Kubernetes cluster configuration file (kubeconfig) from CubeCMP {#download-the-kubernetes-cluster-configuration-file-kubeconfig-from-cubecmp}

1. In the CubeCMP user portal, navigate to **Kubernetes**.
2. Select the cluster name to view basic cluster information.
3. Go to **Cluster Configuration** and click **Download Kubeconfig** to download the Kubernetes cluster configuration file.
4. Save the **kubeconfig** file locally in YAML format.

### Connect to a Kuberntes cluster with kueconfig {#connect-to-a-kuberntes-cluster-with-kueconfig}

1. Open a terminal session with `kubectl` installed.
2. Use the following command to interact with your Kubernetes cluster:

   ```bash
   kubectl --kubeconfig=<path-to-your-kubeconfig-file-name>.yaml <command-to-run>
   ```
