# Connect Your Kubernetes Cluster

This guide walks you through connecting your Kubernetes cluster to **Lapdev**, so Lapdev can manage development environments inside your cluster.

> Read [**Cluster**](https://docs.lap.dev/core-concepts/cluster) to understand cluster roles, permissions, and how kube-manager works.

### Create a Cluster in the Lapdev Dashboard

1. Go to the Lapdev dashboard: <https://app.lap.dev>
2. Navigate to **Clusters** → click **Create New Cluster**.
3. Enter a **name** to identify your cluster (e.g. `staging-cluster` or `dev-cluster`).
4. After creating it, you’ll see an **authentication token** and **installation instructions** for your cluster.

Keep this token handy — it’s used to securely register your cluster with Lapdev.

<figure><img src="https://3284468452-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnCHF64WOwSvzfUL4cG6Q%2Fuploads%2Fgit-blob-390bee0bda7943ce3dcc840109cc2bf4bb7016ee%2FScreenshot%202025-11-19%20at%2020-29-35%20Lapdev%20Dashboard.png?alt=media" alt=""><figcaption></figcaption></figure>

### Install the Lapdev Kube Manager

Run the install command shown in the dashboard, or apply the manifest manually:

```bash
kubectl apply -f "https://get.lap.dev/install/lapdev-kube-manager.yaml?token=<your-cluster-token>"
```

Replace `<your-cluster-token>` with the token generated when you created the cluster. The manifest creates the `lapdev` namespace (if needed), configures the required RBAC, and deploys the `lapdev-kube-manager` controller that securely connects your cluster to Lapdev.

### Configure Cluster Permissions

After the cluster is connected, configure which environment types can be deployed to this cluster:

1. Go to the cluster details page in the dashboard
2. Find the **Permissions** section
3. Toggle permissions based on your needs:
   * **Personal Environments** - Allow developers to create isolated environments
   * **Shared Environments** - Allow team-wide baseline and branch environments

You can change these settings at any time.

> Learn more about cluster permissions and use cases in [**Cluster**](https://docs.lap.dev/core-concepts/cluster).

### Verify Connection

Once the installation is complete:

* Go back to the **Clusters** page in the Lapdev dashboard.
* Your cluster should appear in the list with a status of **Active**.

If the status doesn’t update after a minute, double-check that:

* The `lapdev-kube-manager` pod is running:

  ```bash
  kubectl get pods -n lapdev
  ```
* Your network allows outbound HTTPS connections to `api.lap.dev`.

### Next Steps

Your cluster is now connected to Lapdev! 🎉

You can start:

* Creating an [App Catalog](https://docs.lap.dev/how-to-guides/create-an-app-catalog) from your cluster's workloads
* Creating [Environments](https://docs.lap.dev/how-to-guides/create-lapdev-environment) from your App Catalog
* Learn more about [Cluster concepts](https://docs.lap.dev/core-concepts/cluster) and architecture


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lap.dev/how-to-guides/connect-your-kubernetes-cluster.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
