Necesito comenzar este artículo admitiendo que soy un defensor de las Interfaces Gráficas de Usuario y de todo lo que proporciona una forma de acelerar la manera en que hacemos las cosas y ser más productivos.
Así que cuando hablamos de cómo gestionar nuestro clúster de Kubernetes principalmente con fines de desarrollo, puedes imaginar que soy una de esas personas que prueba cualquier herramienta disponible para hacer ese viaje más fácil. Aquellos que han comenzado a usar Portainer para gestionar su motor Docker local o son fanáticos del nuevo panel en Docker para Windows/Mac. Pero eso está lejos de la realidad.
En términos de gestión de Kubernetes, me acostumbré a escribir todos los comandos para verificar los pods, los registros, el estado del clúster para hacer los reenvíos de puertos, etc. Cualquier tarea que realizaba era con una terminal, y sentía que era lo correcto. Ni siquiera usaba un panel de Kubernetes para tener una página web para mi entorno de Kubernetes. Todo eso cambió la semana pasada cuando me encontré con un colega que me mostró lo que Lens podía hacer.
Lens es una historia totalmente diferente. No lo estoy alabando porque me paguen por hacerlo. Este es un proyecto de código abierto que puedes encontrar en GitHub. ¡Pero la forma en que hace el trabajo es simplemente increíble!
Imagen de Lens mostrando el estado de un clúster de Kubernetes — Captura de pantalla por el autor.
Lo primero que me gustaría mencionar sobre Lens es que tiene soporte multi-contexto, por lo que puedes tener todos los diferentes contextos de Kubernetes disponibles para cambiar siguiendo un enfoque similar al de Slack cuando cambiamos de diferentes espacios de trabajo. Simplemente lee tu archivo .kube/config y hace que todos esos contextos estén disponibles para que te conectes al que desees.
Selección de contexto de Kubernetes en Lens
Una vez que nos hemos conectado a uno de estos clústeres, tenemos diferentes opciones para ver su estado, pero la primera es verificar las Cargas de Trabajo usando la opción de Vista General:
Vista General de Cargas de Trabajo en Lens
Luego, puedes profundizar en cualquier pod u objeto diferente dentro de Kubernetes para verificar su estado y al mismo tiempo realizar las acciones principales que usualmente haces cuando tratas con un pod, como verificar los registros, ejecutar una terminal en uno de los contenedores que pertenecen a ese pod, o incluso editar el YAML para ese pod.
Opciones de pod dentro de Lens
Pero Lens va más allá de las tareas habituales de Kubernetes porque también tiene una integración con Helm, por lo que puedes verificar las versiones que tienes allí, la versión del estado, y así sucesivamente:
Opción de integración de Helm en Lens
La experiencia de gestionar todo se siente perfecta. También eres más productivo. Incluso aquellos que aman la CLI y las terminales deben admitir que para realizar tareas regulares, el enfoque Gráfico y el ratón son más rápidos que el teclado — incluso para los defensores del teclado mecánico como yo.
Así que te animo a descargar Lens y comenzar a usarlo ahora mismo. Para hacerlo, ve a su página web principal y descárgalo:
I need to start this article by admitting that I am an advocate of Graphical User Interfaces and everything that provides a way to speed up the way we do things and be more productive.
So when we talk about how to manage our Kubernetes cluster mainly for development purposes, you can imagine that I am one of those people who tries any available tool to make that journey easier. The ones who’ve started using Portainer to manage their local Docker engine or are a fan of the new dashboard in Docker for Windows/Mac. But that is far from reality.
In terms of Kubernetes management, I got used to typing all the commands to check the pods, the logs, the status of the cluster to do the port-forwards, etc. Any task I did was with a terminal, and I felt that it was the right thing to do. I did not even use a Kubernetes dashboard to have a web page for my Kubernetes environment. All of that changed last week when I met with a colleague who showed me what Lens could do.
Lens is a totally different story. I am not praising it because I am being paid to do so. This is an open source project that you can find on GitHub. But the way that it does the job is just awesome!
Image of Len showing the status of a Kubernetes cluster — Screenshot by the author.
The first thing I would like to mention regarding Lens is that it has multi-context support, so you can have all the different Kubernetes contexts available to switch following a Slack approach when we switch from different workspaces. It just reads your .kube/config file and makes all those contexts available to you to connect to the one you would like.
Kubernetes context selection in Lens
Once we have connected to one of these clusters, we have different options to see the status of it, but the first one is to check the Workloads using the Overview option:
Workloads Overview in Lens
Then, you can drill down to any pod or different object inside Kubernetes to check its status and at the same time do the main actions you usually do when you deal with a pod, such as check the logs, execute a terminal to one of the containers that belong to that pod, or even edit the YAML for that pod.
Pod options inside Lens
But Lens goes beyond the usual Kubernetes tasks because it also has a Helm integration, so you can check the releases that you have there, the version of the status, and so on:
Helm integration option in Lens
The experience of managing everything feels perfect. You are more productive as well. Even those who love the CLI and terminals need to admit that to do regular tasks, the Graphical approach and the mouse are faster than the keyboard — even for the defenders of the mechanical keyboard like myself.
So, I encourage you to download Lens and start using it right now. To do so, go to their main web page and download it: