Don't miss out on new posts! Sign up! Also, visit the VHT Forums!
Kubernetes

Lens Kubernetes: Simple Cluster Management Dashboard and Monitoring

Kubernetes is a well-known container orchestration platform. It allows admins and organizations to operate their containers and support modern applications in the enterprise. Kubernetes management is not for the “faint of heart.” It requires the right skill set and tools. Lens Kubernetes desktop is an app that enables managing Kubernetes clusters on Windows and Linux devices.

Introduction to Kubernetes

Kubernetes is the de facto standard in container orchestration and most businesses that are looking to get into containerized infrastructure will use Kubernetes to run their containers. It isn’t the best solution in every case though, so keep that in mind. Sometimes a single Docker host or a Docker Swarm may fit the bill.

When you run Kubernetes, it allows you to use microservices architecture to run modern applications. Kubernetes clusters come in all shapes and sizes. You can build a multi-node cluster, public clusters, private clusters, or a single-node Kubernetes cluster. The single-node clusters can be used for local development clusters.

When and if there is a problem with a particular Kubernetes host, the control plane spins up new containers on healthy hosts, even if you have thousands of containers you need to run.

Why Kubernetes?

Applications must be highly available and capable of scaling on demand. Kubernetes steps in as a solution to these needs by offering a container-centric management environment. It orchestrates computing, networking, and storage infrastructure for user workloads. This automation accelerates the development process, reduces errors, and ensures applications are always available to meet user demand.

Core Concepts

Kubernetes operates on a set of fundamental concepts:

  • Pods: The basic deployable units in Kubernetes that house one or more containers.

  • Nodes: Machines, VMs, or physical servers where Kubernetes runs.

  • Clusters: Collections of nodes managed by Kubernetes.

  • Services: Abstract ways to expose applications running on Pods as network services.

  • Deployments: Describes the desired state of a particular component of an application.

Kubernetes Clusters

A Kubernetes cluster has at least one master node and multiple worker nodes. The master node is the control plane that manages the cluster, while the worker nodes host the applications running in containers. Kubernetes automates the distribution and scheduling of application containers across the cluster based on the resources the containers need and other factors like high availability.

Lens Kubernetes

Lens Kubernetes, or Kubernetes Lens, is an integrated development environment (IDE) desktop GUI application from Mirantis designed to manage Kubernetes clusters easily and manage your Kubernetes contexts to switch between clusters.

Lens kubernetes
Lens kubernetes

The cluster Lens tool allows you to manage clusters, configure, and administer them as needed and even extend its capabilities with Lens extensions. It also provides a cluster dashboard for your various Kubernetes environments.

Recent features added to Lens

As of the September 2023 update, the following features have been added:

  • Lens Applications Interface: A new refreshed view to enhance interacting with active applications in your cluster. Kubernetes labels act as a unified set of annotations for applications, facilitating effortless identification of correlated components. This helps visibility on application health, performance, and security.

  • Unison with Lens AppIQ Cloud Service: The Applications Interface complements the new Lens AppIQ cloud service, with real-time intelligence and additional application insights. It helps with debugging, operation, and security tasks. It also helps more developers onboard to Kubernetes without needing to master Kubernetes skills.

  • Lens Security Center Upgrades: Resizable columns in the Security Center overview table, along with an export feature for CSV files of images, resources, and roles.

  • Performance Enhancements: The performance has been improved for objects from the Kubernetes API in smaller fragments, resulting in better performance in the Lens Security Center.

Ease of Use with Lens Desktop

Lens Desktop is the essence of simplicity while ensuring productivity. It’s designed to work with any Kubernetes setup, removing the often intimidating complexity of managing Kubernetes clusters.

The interface is intuitive and powerful, enabling users to manage multiple Kubernetes clusters with ease. When you manage multiple clusters, Lens automatically manages the kubeconfig files.

This section can delve into some basic features of Lens Desktop, like real-time cluster metrics, role-based access control, and its command line utility, which enhances the user experience significantly.

Collaborative Environment with Lens Teamwork

In a team environment, Lens offers a collaborative platform for cloud-native development. Lens Teamwork allows for secure sharing and access to clusters used by your team.

Inviting new members and managing their access is made simple with Lens Pro, a subscription model that extends the core functionality of Lens Desktop​3​. Whether it’s assigning teams, managing Kubernetes RBAC with ease, or sharing a common catalog for all clusters and cloud-native resources, Lens Teamwork is all about enhancing collaboration and productivity.

Security Features

Security is extremely important when dealing with Kubernetes clusters across different environments. Lens provides end-to-end encrypted connections from Lens Desktop to your clusters that are local, on-prem, or on public clouds. It also makes it easy to work with kubeconfigs, VPNs, or complicated IAM setups​.

Extending Capabilities with a Lens Pro Subscription

Lens Pro offers extended functionalities of Lens Desktop. The pro features include enhanced security, commercial support, and provides increased productivity and time to value for teams.

Note the following comparison between the Lens personal subscription and the Lens Pro subscription:

Feature/AspectLens PersonalLens Pro
PricingFree$19.90 per user/month or $199 per user/year​​
EligibilityPersonal use, education, and startups with less than $10 million in annual revenue or funding​Professional use in larger businesses​​
Core FunctionalityRobust desktop application for managing Kubernetes clustersSame as Lens Personal, with additional Pro features
Team CollaborationNot SpecifiedEnhanced team collaboration with shared views and simplified cluster access​
SupportCommunity SupportNot Specified
Additional FeaturesNot SpecifiedPro features included​

​Community and Support

Being built on open source, Lens has a vibrant community backed by many Kubernetes and cloud-native ecosystem pioneers. The community support and features make Lens a valuable tool for anyone looking to simplify their Kubernetes cluster management tasks​​.

Install Lens Kubernetes

You can download Lens here: Lens | The Kubernetes IDE (k8slens.dev). Below is a quick look at the screenshots from installation.

Beginning the installation of lens kubernetes
Beginning the installation of lens kubernetes

UAC popup in Windows.

Uac prompt from windows
Uac prompt from windows

Installation location.

Choose your installation locaton for lens kubernetes
Choose your installation locaton for lens kubernetes

Finishing the setup.

Completing the setup
Completing the setup

Launching Lens for the first time.

Launching lens kubernetes desktop for the first time
Launching lens kubernetes desktop for the first time

Adding a Kubernetes Cluster connection to Lens

Let’s add a Kubernetes cluster to Lens. Click the cluster icon. As you can see below, one of the things many don’t like about the commercial Lens tool are the nags to upgrade to the pro subscription.

Beginning the process to add a cluster to lens
Beginning the process to add a cluster to lens

Enter your Kubeconfig file contents for cluster access.

Pasting in a kubeconfig file
Pasting in a kubeconfig file

Kubernetes cluster connection is established. As you can see, even if you have cluster sprawl, managing cluster in Lens is easy with the way it automatically manages cluster context.

New cluster successfully added
New cluster successfully added

Adding cluster metrics to your Kubernetes cluster

By default, you have to enable the cluster metrics for your Kubernetes cluster.

Cluster metrics are not yet added
Cluster metrics are not yet added

Go to your Cluster settings.

Navigating to cluster settings 1
Navigating to cluster settings

Then go to Lens Metrics and enable the toggles.

Turning on cluster metrics in lens kubernetes
Turning on cluster metrics in lens kubernetes

Here we have enabled the integrations to start collecting metrics.

Cluster metrics turned on in lens kubernetes
Cluster metrics turned on in lens kubernetes

After toggling the metrics integration, you will start to see metrics information displayed in the Lens desktop.

Lens kubernetes cluster metrics starting to stream in
Lens kubernetes cluster metrics starting to stream in

Add a cluster to the hotbar in Lens Desktop

One thing I like about Lens is it lets you add your favorite or most used clusters to what it calls the “Hot bar.”

Add a cluster to the hot bar
Add a cluster to the hot bar

After adding a cluster to the hot bar in Lens Desktop.

Cluster successfully added to the hotbar
Cluster successfully added to the hotbar

Viewing nodes and other information about your Kubernetes Cluster

Below are a few screenshots of viewing cluster information from the Kubernetes cluster added to Lens.

Viewing node statistics in lens kubernetes
Viewing node statistics in lens kubernetes

Viewing workloads.

Viewing workload overview
Viewing workload overview

Viewing pods in all namespaces using Lens.

Viewing workloads
Viewing workloads

5 alternatives to Lens Kubernetes

While Lens Kubernetes is a great way to manage your Kubernetes clusters, other tools and platforms offer similar things. Here’s a look at some of them:

Feature/AspectLensOpen LensKubectlKubeSphereRancherOctant
User InterfaceGraphicalGraphicalCommand LineGraphicalGraphicalGraphical
Community DrivenNoYesYesYesYesYes
Multi-Cluster SupportYesYesYesYesYesNo
Multi-Tenancy SupportNoNoNoYesYesNo
Real-time MonitoringYesYesNoYesYesYes
Extensible (Plugins)YesYesYes (via scripts)YesYesYes
Open SourceYesYesYesYesYesYes
Integrated DevOpsNoNoNoYesYesNo
Security FeaturesYesYesBasicAdvancedAdvancedBasic

Open Lens

Open Lens is basically the open-source version of the commercial Lens product. You can check out my write up on Open Lens here: Openlens Kubernetes IDE.

Kubectl

Kubectl (koob cuttle is how many pronounce it) is the main command line tool and main tool in general used by Kubernetes professionals. You can use it to check nodes, pods, and configurations. Using it, you can pull down various YAML configurations and install components in your cluster.

KubeSphere

KubeSphere is an open-source, operating system for Kubernetes. It adds to the native Kubernetes capabilities to provide multi-tenancy, observability, and DevOps. It helps make Kubernetes management easier. Open Source Enterprise Kubernetes Platform | KubeSphere

Rancher

Rancher is the company behind K3s. They also have their Rancher management tool that allows managing and configuring self-hosted Kubernetes clusters on-premises and in the cloud. You can spin up and manage clusters running on top of vSphere on-premises, AWS, Google, etc. Enterprise Kubernetes Management Platform & Software | Rancher

Octant

Octant is an open-source web UI for Kubernetes, that allows Kubernetes admins to inspect their clusters and manage them with insights and various tools. Octant

Frequently Asked Questions

What sets Lens Kubernetes apart in managing multiple clusters?

Lens Kubernetes provides a GUI dashboard and management IDE that allows for easy navigation and operation across multiple clusters. You can monitor real-time cluster metrics, enable role-based access control, and have access to the Kubernetes command line utility right from the Lens dashboard.

Is there a command line utility for Lens Kubernetes?

Lens allows you to have access to the command line, using the Lens GUI. Using the CLI built into the tool, you can have the best of both worlds when you need it.

How does Lens address cluster sprawl?

Cluster sprawl can be a challenge. Lens helps organize clusters, which in turn helps manage cluster sprawl. The ability to manage multiple clusters from a single interface helps in keeping things organized and under control.

Can Lens Kubernetes work with private clusters?

You can work with private clusters using the Lens Desktop GUI. It doesn’t matter where your K8s clusters are located. You just need to have connectivity to them.

How does Lens handle role-based access control (RBAC) in Kubernetes?

With Lens, you can manage user permissions and roles. By assigning only the permissions needed, you can tighten security and access rights.

Is there a way to monitor resource utilization in Lens?

Yes, Lens provides resource utilization charts that give insights into how resources are being used within the clusters. This feature is crucial for ensuring that your clusters are operating efficiently and not being over or under-utilized.

What OS’s are Lens Kubernetes compatible with?

Lens is compatible with Windows, macOS, and Linux platforms.

Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com and has over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, Brandon has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family.

Related Articles

One Comment

  1. As for Lens, from an Open Source perspective Lens is largely dead – Losing large numbers of its user-base after they stopped.providing pure open-source binaries, forcing users to use the commercial releases with unnecessary plugins (that nag and upsell) and made it mandatory for users to sign up for accounts etc… even more recently, they started stripping stuff out of the Open Source code.. thankfully a couple of people set-up their own builds based solely on the OSS code..

    Also, VMWare stopped working on Octant about a year ago, the Github repo was put into Archive.

    2 alternatives to consider are Monokle and K9S.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.