If You K8s, Please Try K9s…

K9s Kubernetes CLI To Manage Your Clusters In Style!

Let’s face it, Kubernetes and its surrounding ecosystem is getting more and more complicated to operate. There are a multitude of tools one must wrangle to manage clusters. When I am working on a cluster, I need the ability to watch the various Kubernetes resources that I employ, dig into configuration, settings, as well as track down issues when things don’t quite go as expected. This flow typically entails aliasing overused commands, installing/operating single purpose CLI tools and custom bash scripts to keep some sanity, not say somewhat healthy wrists...

I know this technic is becoming controversial, but I typically develop code locally and against my local minikube instance and dockerize last. I usually don’t need the entire application deployed on my cluster to work on any given service. I find honing my code along with my configurations and resources manifests to be a continuum and not separate activities. Thus, my daily Kubernetes routine is to fire up one or more terminal windows, broken into various tabs/panes with a few watch commands monitoring the resources du jour along with open CLIs to issue kubectl and build commands.

One day, I was contemplating this brainwashed flow and realized it would be cool to have a simple CLI utility to watch K8s resources, switch between them, checkout manifests, logs, monitor events and exec into pods and hence eliminate most of my real estate sucking terminal panes…

And so, I wrote a tool about it ! It’s called K9s and does just that.

K9s Pod View

This terminal based UI, monitors Kubernetes resources on a given interval (default 2s) and allows me to see what’s up with my clusters. I can quickly navigate between development and production clusters using ctx<enter> command. The CLI allows me to filter out by namespace and perform read only operations on most Kubernetes resources (still work in progress…). If I get stuck ?<enter> list out all supported resources.

Of course, I find it useful and would like to share it with you and see what you think… Here is the link to the repo and install instructions.

🐶 Thank you for your time!