Intro
Kubernetes is a portable, extensible open-source system for the automation, deployment, scaling, and management of containerized applications and services. It is a cluster management tool that helps abstract machines, storage, and networks away from their physical implementation. Almost everyone in the DevOps community uses Kubernetes.
Problems
One major problem with Kubernetes is that it comes with a vast amount of moving parts and certain complexities, such as handling clusters, scaling, storage orchestration, batch execution, and more. This all hinders mainstream developer adoption.
Another problem with Kubernetes is the use of command-line CLIs that consume and retrieve multiple files, and the use of tools like kubectl that might be good for some, but which can be overwhelming for others who may prefer GUIs.
Solution
Lens
Kubernetes Lens is an effective, open-source IDE for Kubernetes. Lens simplifies working with Kubernetes by helping you manage and monitor clusters in real-time. It was developed by Kontena, Inc. and then acquired by Mirantis in 2020, who then open-sourced it and made it available to download for free.
The lens is a standalone application and can be installed on macOS, Windows, and some Linux flavors. With Kubernetes Lens, you can talk to any Kubernetes cluster, anywhere.
Kubernetes Lens is aimed at developers, SREs, and software engineers in general. It is most likely the only platform you will need to manage the cluster system of your Kubernetes. It is backed by a number of Kubernetes and cloud-native ecosystem pioneers such as Apple, Rakuten, Zendesk, Adobe, Google, and others.
Manage clusters
Managing clusters in Kubernetes can be difficult, but with Kubernetes Lens, you can work on multiple clusters while maintaining context with each of them. The lens makes it possible to configure, change, and redirect clusters with one click, organizing and revealing the entire working system in the cluster while providing metrics. With this information, you can easily and very quickly edit changes and apply them confidently.
Adding a Kubernetes cluster to Lens is easy. All you need to do is point the local/online kubeconfig file to Lens and it automatically discovers and connects with it.
With Lens, you can inspect all the resources running inside your cluster, ranging from simple Pods and Deployments to the custom types added by your applications.
Built-In Visualization and Metrics
Kubernetes Lens comes with a built-in Prometheus setup that has a multi-user feature that gives role-based access control (RBAC) for each user. That means that, in a cluster, users can only access visualizations they have permission to access.
In Lens, when you configure a Prometheus instance, it is able to display metrics and visualizations about the cluster. To add Prometheus to Lens if it is not already installed, follow these steps.
- Open a cluster. In my case, I have opened minikube.
- Open the cluster settings.
- Click on the metrics and set it to Auto Detect Prometheus.
- Go to Lens Metrics, enable all the Lens metrics options and apply.
Result
After some moments later and enabling the checks, the result will be shown to you.
With Prometheus, you get access to real-time graphs, resource utilization charts, and usage metrics such as CPU, memory, network, requests, etc., which are integrated into the Lens dashboard. These graphs and metrics are shown in the context of the particular cluster that is viewed at that moment, in real-time.
I hope you like this blog. If you liked it then don't forget to share it with others. You can also follow me on YouTube, Twitter, and LinkedIn.
Thank you!