Introduction
In this article we will see 2 great tools I like to use. The first one is called K9S, which is a CLI that will help you to manage your Kubernets clusters. The second one is called Lens, an IDE to deal with Kubernetes clusters on a daily basis.
K9S
K9s provides a curses based terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications. This command line app continually watches Kubernetes for changes and offers subsequent commands to interact with observed resources.
Once you have installed k9s (i.e by downloading it on github), run the following commands to get used to it :
# List all available CLI options
k9s help
# To get info about K9s runtime (logs, configs, etc..)
k9s info
# To run K9s in a given namespace
k9s -n demo
# Start K9s in readonly mode - with all modification commands disabled
k9s --readonly
Here a some examples of screens and actions you will be able to see / run :
As you can see on the top of the screen, you can navigate through namespaces, get the yaml file of the pod (describe), get logs, access to it, delete it etc.
Here is an example of logs :
You can view a Kubernetes resource using singular/plural or short-name using “:”. For example, if you type “:deployments”, you will see deployments as below :
Lens
Lens is a powerful IDE for people who need to deal with Kubernetes clusters on a daily basis. It can be used with any operating systems. It ensures your clusters are properly setup and configured. You will be able to have a better visibility, real time statistics, log streams and hands-on troubleshooting capabilities.
Clusters may be added simply by importing the kubeconfig with cluster details in Lens. Once added, it is easy to switch between clusters to work on. You’ll get a single unified IDE for all your clusters!
You willget graphs and resource utilization charts integrated as part of the dashboard. Lens comes with a built-in and multi-tenant Prometheus setup that will respect RBAC for each user. Users will see visualization for all the namespaces and resources they have access to. All graphs and resource utilization charts are designed to be very accessible and available in the right context no matter which part of the dashboard you are operating.
Here is an example of what you will be able to see on Lens :
In my opinion both tools are great, user friendly and can be used independently to reach the same goal : be efficient and get all relevant information as fast as possible !