How to use Kontena Lens-Beautiful kubernetes UI

Open Source Contributions
Reading Time: 6 minutes

Hello Readers! In this blog we are going to see all about kontena lens-Beautiful kubernetes UI. Here we will see how to use the kontena lena user interface to manage multiple kubernetes clusters at the same time. This does not only provide a beautiful and interactive UI but also we can use it for accessing and managing configurations of your cluster. 

So, let’s get start with it! It’s really awesome.You will enjoy it.

Installation of Kontena Lens:

To get start playing with it we need to install it on our system. I will use here snap for installing:

$ sudo snap install kontena-lens --classic
install kontena lens

It’s now successfully installed for me. Let’s go.

Kontena Lens Dashboard:

This is the initial dashboard you will find when you will open it.

dashboard of kontena lens

Add clusters by clicking the Add cluster button. Now, select the kubeconfig file for the cluster you want to add. You can also select it from your file system. Select the cluster and click on Add cluster.

add cluster in kontena lens

My cluster is now added as you can see below i.e minikube.

kontena lens

Click on Node in the left side menu bar. You will find here the list of nodes that your cluster has with its CPU, memory, disk, taints, status and many details. From here you can open your shell for your node, cordon, drain, edit as well as delete your node.

nodes

Initially you will not find any metrics stack of your cluster if you don’t have the prometheus stack installed. If it is so then you can install from the settings option.

kontena lens

After its installation you will now be able to see all the metrics stacks of your cluster. This will include the following below options.

kontena lens

Inside the workload section you will be able to visualize all your kubernetes cluster objects including pods, deployments, daemonsets, statefulsets, replicasets, jobs and cron jobs. You can select the namespace for which you want to see. You can find here the status for all your objects. 

cluster workloads

For any particular pod you can see the real time logs from here.

pod logs

Following is the log for my pod selected in my namespace.

logs

We can also open our sheel connected to my pod by selecting the shell option from right.

open shell

Now I am connected to my selected pod.

shell

This is the list of deployments that my cluster has. Here you can find the options for scaling, restart, edit and delete options for your deployment. Similarly you will find daemonsets, statefulsets, jobs, replica sets and cron jobs.

deployments

Lets see the options inside configurations. Here we will find secrets, resource quotas, limit ranges, horizontal pod autoscaling and pod disruption budgets. You can see below the list of secrets in my kube system namespace with its details.

kontena lens

If you want to create a secret you can do that.

create secret

Let’s move to the network tab. Inside this you will find all the services, endpoints, ingresses and network policies of your cluster. Here is my list of services of my cluster with its details. You can edit as well as delete your networks from here.

networks

Below the network there is a storage tab in which you will find PVC, PV and SC. Below is the list of persistent volumes in my all namespace. Here also we can delete and update my storage inside my cluster.

volumes

Open the namespace tab. These are my namespaces with its labels, age and its status.

namespaces

We can also create a namespace from here.

create namespace in kontena lens

You can see it’s successfully created.

create ns

When you click on the edit button, the yaml file will open where you can edit your namespace.

edit namespace

These are the list of events that occurred in my cluster with its details.

list events

When you move to the access control button you will see service accounts, role bindings, roles and policies there. Here is the list of my role bindings on my minikube.

access control

We can create these also as you can see below. Only you have to select the options for your object.

add rolebinding

Kontena lens also provides its interactive terminal. We can run the commands here if you want, otherwise you can use its beautiful UI to operate.

terminal

Inside Apps you can find predefined charts and its releases. Here I am selecting dokuwiki to install. Therefore Click on the install button. 

create charts

Its yaml file will open. If you want to change something inside it you can. Now select the namespace in which you want to deploy. Click again on install.

chart yaml

My installation is completely successfully done now. 

install chart in kontena lens

Click on view helm release you will find your release there. The status is deployed and all its details you can see.

releases

Go to the workloads tab and you will find there the status of objects that are deploying. Its status is pending now. So, It will take some time.

kontena lens

Now it’s successfully done.

objects status

So, This is how we can use the kontena lens not only for real time visualization but also for managing multiple kubernetes clusters and its objects by using its awesome dashboard.

I hope you liked it!!

Conclusion:

Thank you for sticking to the end. In this blog we came to know all about kontena lens. We have seen its interactive dashboard how we can utilise it. So, If you like this blog, please do show your appreciation by giving thumbs ups and share this blog and give me suggestions on how I can improve my future posts to suit your needs.

HAPPY LEARNING!

Written by 

Naincy Kumari is a DevOps Consultant at Knoldus Inc. She is always ready to learn new technologies and tools. She loves painting and dancing.