Many great Kubernetes tools are available for K8s admins to use to administer, configure, and monitor their Kubernetes clusters. If you are looking for an open-source Kubernetes IDE, a great solution is available for working with Kubernetes clusters — Lens and Openlens. Let’s look at both solutions and see how it fits in with your Kubernetes management workflow.
Table of Contents
What is Kubernetes?
Kubernetes is the de facto standard for running containerized workloads in the enterprise. It allows running modern applications in a highly available and scalable way. As a result, organizations worldwide are running Kubernetes.
However, Kubernetes is not known for being easy to work with and requires a certain skillset for administration, including intimate knowledge of the kubectl command line tool. In addition, the lack of any graphical interface to manage Kubernetes can challenge newcomers. However, even for experienced Kubernetes admins, having the right tools to work with Kubernetes can help manage the solution more effectively and efficiently.
What are Lens and Open Lens desktop?
The Lens and Open Lens tools are a type of desktop-integrated development environment (IDE) for working with Kubernetes. Cloud-native ecosystem pioneers developed the solution that is now the Open Lens project.
Both Lens and Open Lens provide the same tools for Kubernetes clusters, nodes, workloads, configuration, storage, persistent volume claims, namespaces, log streams, and other cluster details and key metrics. In addition, they provide full situational awareness, allowing you to work with multiple clusters simultaneously on the same machine.
Open Source vs. Commercial
Open Lens is still the free and open-source version of the project, while Lens is the commercial variant owned by Mirantis, which also has a free version that mirrors the functionality of Open Lens.
They share the same base source code with Mirantis adding paid features into the subscription version for working in a team environment.
Graphical user interface
It provides an all-in-one solution for managing and configuring your Kubernetes cluster using a graphical user interface, radically improving productivity. With Lens, you can manage multiple Kubernetes clusters and interact with multiple clusters simultaneously.
Lens provides a cluster graphical dashboard experience so you can easily perform cluster management using the GUI while still having easy access to the Kubernetes command line from the interface.
Below is an example of the Lens IDE desktop interface, viewing the cluster metrics in the Kubernetes environment. It provides really great resource utilization charts for viewing the performance of your production Kubernetes clusters.
Lens allows you to view and manage your Kubernetes pods easily.
Openlens vs. Lens desktop
Lens is a commercial product based on the open-source project called Open Lens. However, Lens offers Lens personal subscriptions, which are free to download and use for students, hobbyists, and startups with less than $10M in annual funding or revenue. In addition, you can create a Lens ID to download the application for free.
When you visit the Lens site, you can download the free or Lens pro subscription versions with additional features. Choose Lens personal for the free download or the pro edition for the paid subscription.
With the paid Lens subscription, you get more enterprise features, such as role-based access control.
With the paid subscription, you also get additional features, including:
- Lens Teamwork — the ability to work and collaborate with multiple users for Kubernetes management.
- Lens Security — with Lens container security, you can scan containers for security reports directly.
- Lens Desktop Kubernetes — local development clusters and production clusters.
- Community Forums & Slack — you get access to the community slack channel.
- 24 x 5 commercial support — also, in addition to the community support, you get paid support from Mirantis.
Note. Learn how to use Kubectl port forward.
Download Openlens
If you want to download the OpenLens project, you can grab the executable using the public GitHub repository below:
Releases · MuhammedKalkan/OpenLens (github.com)
Lens key features
Lens features many great capabilities for working with your Kubernetes clusters, including the following:
- Remove complexity — the Lens desktop application helps remove the complexity of managing, configuring, and monitoring Kubernetes clusters.
- Run on your desktop — it is a standalone application that can run on your Windows, Linux, or
- Real-time observability — you can access the real-time performance and health metrics of your Kubernetes lens-managed clusters.
- Built on open source — as we mentioned earlier, Lens is built on top of the Open Lens project, which is free and open source.
- Troubleshoot and Debug — if you need to troubleshoot your Kubernetes cluster quickly, Lens provides a quick and easy way to do that.
- Works with any Kubernetes — lens can manage many different types of Kubernetes, including EKS, AKS, GKE, Minikube, Rancher, k0s, k3s, and OpenShift. If you have a Kubeconfig file, Lens can connect to it.
Installing Lens
The process of installing Lens is straightforward. First, download the installer from Lens and run it on your platform.
Choose your installation location.
After clicking install, the installation will begin.
After just a moment, the application will install. You can leave the checkbox enabled to “Run Lens” if you want to launch the program immediately after installation.
Lens desktop launches for the first time. If you install Lens, you will be asked if you want to try the paid solution. However, OpenLens does not have the commercial nags found in Lens.
Adding Kubernetes clusters to Lens
To begin adding Kubernetes clusters to Lens is straightforward as well. One of the great things that Lens and Opens Lens do when you install the application is they automatically look for kubeconfig files in your user profile directory.
It will automatically add connections to these clusters in your Lens app. Lens and Open Lens both have situational awareness. They automatically handle the connections and use the appropriate kubeconfig to connect to the appropriate Kubernetes cluster.
This also carries forward and allows your Kubernetes command line to be a context-aware terminal. You can also manually add K8s. Click on File and Add Cluster.
Below is the dialog box to enter the text from a kubeconfig file. If you have a K8s cluster that was not already configured as a kubeconfig in your user profile, this allows setting up a new connection with Lens.
Enabling Lens Metrics
To monitor the Kubernetes cluster metrics, we need to add the Lens metrics installation to our Kubernetes Lens desktop cluster. To do this, Lens makes this easy as we navigate to the settings of the Kubernetes cluster in Lens, and then under extensions, click Lens Metrics. Next, you can click the cluster icon and then settings.
You will see the toggles to toggle on the following:
- Enable bundled Prometheus metrics stack.
- Enable bundled kube-state-metrics stack.
- Enable bundled node-exporter stack.
Installing the Openlens metrics
As a side note, installing the Openlens metrics is the same process. You will find the graphical user interface in Openlens to be identical to Lens when managing clusters.
Built-In Visualization and Metrics
Once you install the metrics extensions using Prometheus, you can access quick and easy Kubernetes metrics for your Kubernetes hosts, pods, networks, and other information. Click browse clusters and click the cluster menu to see the overview dashboard of metrics and any errors for your cluster. Below is a look at the visualizations in OpenLens after installing the Prometheus extensions.
Using Lens Desktop
Using Lens desktop is extremely easy as it is a modern point-and-click interface that allows you to click the various menus on the left-hand side of the GUI and work with the configuration and operations of each on the right-hand side of the interface.
One of the great features of Lens is the built-in terminal that is context-aware. If you are using a standard installation of kubectl, you will need to switch between the different kubeconfig files to work with other clusters.
However, with Lens, it manages this interaction for you automatically. As a result, Lens and OpenLens provide a new cluster dashboard experience far and above using only the command line to monitor your Kubernetes clusters and easily manage multiple clusters.
Summary
The Kubernetes Lens IDE is a great solution that allows K8s admins to get the most out of their Kubernetes environment, helping to simplify the day-to-day management, monitoring, and configuration of Kubernetes clusters. Compared to only using the kubectl command line tool, Lens and OpenLens both streamline modern Kubernetes management tasks.