In this article, we will describe how to connect a Kubernetes cluster to Lens, a desktop application for managing clusters.
Lens Desktop is available in three versions:
To use the free Lens version, go to the Lens ID creation form and create a Lens ID. It will have a subscription for the free version.
If you already have a Lens ID, click Login with Lens ID, enter your credentials, and log in. The free license will be added to your Lens ID.
After successful login, the Lens Desktop will open.
You can save the configuration for connecting to the cluster in the default Lens folder or a custom one.
When using the standard folder (~/.kube
or ~/.k8slens
, depending on the OS), you should see the name of your cluster in the Catalog → Clusters section. You can also access it from the welcome menu that appears after successful authorization in Lens by selecting Browse Clusters in Catalog.
Create a folder named k8s_config
in a location convenient for you (you can name the folder as you wish).
Download the configuration file (kubeconfig
) from the dashboard of the created cluster and place it in the folder you just created.
In the Clusters section, click the + button in the lower right corner and then add the configuration file(s) or the entire folder with files for initialization.
Connect to the cluster by clicking on it.
You're all set! You are connected to the created Kubernetes cluster.
You can learn about cluster management through the Lens IDE in the official documentation.