I recently ran an internal hands-on workshop where I demonstrated to our field, marketing, support and engineering on just how easy it is to deploy and manage Tanzu Kubernetes Grid (TKG) Clusters running on VMware Cloud on AWS. While developing the lab which has been several weeks in the making, I did not want to assume everyone was familiar with Kubernetes (K8s) and as part of the workshop, I thought it would be useful to include some additional utilities that would provide a better lab experience for those that are just getting started in their K8s journey.
I included tools like bat, kube-ps1 and Octant as an example and the weekend before the workshop, I came to learn about a really neat terminal-based UI tool called kubelive and I knew I had to include that in the workshop. Interestingly, after the workshop, several folks shared with me that they had not heard of this tool either and others on Twitter had the same feedback. Given the level of interests with K8s in the VMware community, especially with the launch of vSphere with Kubernetes (Project Pacific), I thought it might be useful to share some of the terminal-based and graphical UI tools that I had been evaluating and learning about.
As of writing this blog post, my current two favorites is Octant for a graphical-based UI (browser) and K9s for a terminal-based UI.
Octant is a browser-based UI aimed at application developers giving them visibility into how their application is running. I also think this tool can really benefit anyone using K8s, especially if you forget the various options to kubectl to inspect your K8s Cluster and/or workloads. Octant is also a VMware Open Source project and it is supported on Windows, Mac and Linux (including ARM) and runs locally on a system that has access to a K8S Cluster. After installing Octant, just type octant and it will start listening on localhost:7777 and you just launch your web browser to access the UI.
One thing I really like about Octant is how easy it is to switch context between different K8s Cluster with a simple drop down along with namespace filtering which is quite helpful in narrowing down a specific deployments, usually for informational or troubleshooting purposes.
Most of my workflows generally involves a specific K8s pod and the Resource View tab is super handy to give me a quick overview of the different resources that is associated whether that is a deployment, secret, service, etc.
The YAML tab beats using cat and bat, especially for really large and complex deployments and you can search right in the browser.
Until learning about Octant, I always had to use kubectl to tail logs while debugging solutions like the vCenter Event Broker Appliance (VEBA). With Octant, you just select the pod that you are interested in and clicking on the Logs tab. You can also filter on specific key words which can be handy when the logs are flying across your screen. This alone was enough for me to start using Octant 🙂
In my workshop, I had my Octant running in PhotonOS which has access to my K8s Cluster but it because there is no web browser and it only listens on localhost, you can not use the UI. Having said that, you can use SSH port forwarding to access the Octant UI on your local desktop which is what I ended up doing. Here is the command you would use if you are on a Mac or Linux desktop
root@<RemoteIP> -L 7777:127.0.0.1:7777 -N
If you are on Windows, you can do the same using SSH Client like Putty to do port forwarding.
Lens an Electron-based desktop application that runs on Windows, Mac and Linux. Similar to Octant, it can connect to a local K8s Cluster and you can also add a custom configuration by copying/pasting the kube configuration which I thought was pretty nice. I thought the structure and layout was pretty easy to understand as I still found myself clicking around in Octant or scrolling on the left hand navigation which Lens did not have much of which is really nice. I think for a small number of K8s Cluster, Lens can be a nice option as you switch context by simply click on the icon in the far left. I think it can be a bit problematic if you need to manage a lot more and this is where I think Octant may have a better user experience with the drop down option.
One thing I really appreciated with Lens is the ability to quickly search and filter out the things I am not interested in. This is something I hope the Octant folks will consider as I think would make for a much better experience when you have a ton of pods running. Lens also supports terminal access to a pod which takes a couple of clicks and I found the window to be quite small to do anything useful, this is where I think Octant excels if you need to debug and troubleshoot.
Kubevious is another really interesting and slick browser-based UI which I just discovered this past weekend while working on this blog post! What is really cool about Kubevious is how you can navigate through your application in a hierarchal fashion and quickly drill down into the application details and configurations within a single view. The visual graphics is also quite nice, but it does feel a bit "boxy" and probably could be cleaned up but that is a minor detail. One downside about Kubevious is that it runs directly on the K8s Cluster, so this means you would have to deploy Kubevious to each and every K8s Cluster if you want to use this tool rather than being able to just point to an existing K8s Cluster.
The gif animation below does not do it any justice, but there is an online demo https://demo.kubevious.io/ if you want to check out how it works.
Kubelive is a terminal-based UI using Node.js and is the motivation behind this blog post when I first discovered it. It is pretty easy to use but it currently is limited to just a handful of kubectl commands. The reason I found this tool to be really slick is the ability to easily navigate through the various namespaces for a given K8s Cluster and quickly show the status of given set of pods.
Right now, you can only clone or delete a pod which might be come in handy for debugging purposes but it will need more functionality before this can be a real tool of choice. For my initial demo, it allowed me to quickly show the various namespaces without typing a bunch of commands and the underlying containers that we had just deployed. Keep up the good work Ameer and looking to seeing more in the future!
K9s is another terminal-based UI that actually came in as a recommendation from Fabian Brash after I shared on Twitter about Kubelive. I have to say, I am totally in love with K9s and its easy to interface. You get a similar experience like Kubelive with the ability to easily navigate through namespaces and pods. However, it is more than just navigating and something more practical that I was looking for which K9s provides is showing the logs of a specific pod. It is going to take me some time to memorize the various shortcuts as you can jump across different K8s objects by using ":" notation and specific key words like :ns for namespace and :po for pods as an example. K9s works just like Kubelive, you just type the command after installing the binary and it will give you access to the specific K8s Cluster which you have context in.
With the adoption of K8s continuing to grow at a rapid pace, I suspect we will see many more projects and innovations in this space whether that is using a web browser or a multi-platform desktop application to a terminal-based UI that you can simply launch in the command-line. If there are others worth checking out, feel free to leave a comment. As I conclude this blog post, I also saw mention of kubenav which supports both mobile (maybe a first) and can also run as a multi-platform desktop application. I did not really find it to be intuitive to use compared to the above tools.