Skip to content

Add a cluster#

Lens Desktop automatically detects clusters from the specified kubeconfig files. You can find available clusters in Catalog.

Specify kubeconfig files#

To specify kubeconfig files:

  1. In Catalog > Clusters, point the mouse cursor on the Add Cluster button.
  2. Select one of the following options:

    • Sync kubeconfig file(s)

      The path to particular kubeconfig files.

    • Sync kubeconfig folder(s)

      The path to folders that contain kubeconfig files.

Add a cluster manually#

Lens Desktop supports manual adding clusters through the Add Clusters from Kubeconfig menu. In this menu, you can put a separate from the specified in the Preferences menu kubeconfig file.

Note

The kubeconfig file that you add in the Add Clusters from Kubeconfig menu does not merge into the kubeconfig file specified in the Preferences menu. See details about Kubeconfig Syncs in Preferences.

To add a cluster manually:

  1. In Catalog > Clusters, point the mouse cursor on the Add Cluster button.
  2. Select Add from kubeconfig and paste the custom kubeconfig file to the following input field.

Tip

Click this link to open the Add Clusters from Kubeconfig menu directly.

See Organizing Cluster Access Using kubeconfig Files for more information about kubeconfig files.

To see your current cluster configuration:

  1. In the Cluster view, click the New tab button and select Terminal session.
  2. In the Terminal tab, execute the following command:

    kubectl config view --minify --raw
    

When connecting to a cluster, make sure you have a valid and working kubeconfig for the cluster.

Remove a cluster from Lens Desktop#

You can remove a cluster from the list of clusters both in the Catalog menu and the cluster view. Removing the cluster from Lens Desktop does not affect the cluster itself or its configuration.