Hacker News new | ask | show | jobs
by fuziontech 1406 days ago
For anyone managing a k8s cluster and are fatigued with memorizing and reciting kubectl commands should definitely take a look at k9s[0]. It provides a curses like interface for managing k8s which makes it really easy to operate and dive into issues when debugging. Move from grabbing logs for a pod to being at a terminal on the container and then back out to looking at or editing the yaml for the resource definition in only a few key presses.

[0] https://k9scli.io/

13 comments

I've used k9s every day for the last 6 months and it's really superior to everything if you have any vi-fu. It even plays nice with the terminal emulator's colour scheme. It's simply an all-around pleasant experience in a way no dashboard is.
I like Lens, as more of a GUIs fan, and very occasional k8s-er. It has saved me a lot of time.
Lens has been bought by another company, the same one that bought Docker, and they are not playing nice with the community.

Some people have forked it to remove the newly added trackers, the forced login, and the remote execution of unknown code, but I sadly guess that it will become a corporate nightmare and the forks will not be popular enough to really take over the development.

Which fork do you recommend?
You have a few OpenLens and one LibreLens and so far they only remove the newly added controversial features.
That’s the one I use but the fork owner does not seem interested in maintaining the whole project. His fork is mostly a patch.
For those who use emacs, I'd also recommend the very nice `kubel` plugin - an emacs UI for K8S, based on Magit.
I had to look up k9s because I wondered what you meant by "curses like interface" - it couldn't be where my mind went:"f*ck_u_k8s -doWhatIwant -notWhatISaid"

And upon lookup I was transported back to my youth of ascii interfaces.

K9s made my learning of k8s way way way easier. I still use it every single day and I absolute adore it. The terminal user interface was so absolutely fantastic that it genuinely sparked my motivation to build more TUIs myself.
Do you pronounce it 'canines' or 'K-9-S'?
Logo is a dog, and everybody I know call it "canines"
I use k9s every day, love it. Only problem is that the log viewing interface is buggy and slower than kubectl get logs. Still love it though.
The larger the log buffer is, the slower k9s gets unfortunately. For me the builtin log viewer is useful for going back short time periods or pods with low log traffic.

You can work around it by using a plugin to invoke Stern or another tool when dealing with pods with high log traffic.

Can’t vouch for k9s enough, it’s great and I think it helped me to gain a much better understanding of the resource/api system.
k9s is by far the most productive tool in my toolshed for managing & operating k8s clusters.
Has anyone on AWS gotten k9s to work with Awsume [0] authentication? I miss using it but I can't auth to different AWS accounts and access my EKS clusters with it unfortunately.

[0] https://awsu.me/

edit: I figured it out! You need to use autoawsume which is triggered by awsume $profile -a

I've been using and recommending k9s to everyone and it just works. I love it and use it enough that I'm a sponsor.

It's an amazing project by a solo dev, please consider sponsoring. My guess is anyone using kubernetes can afford to get their org to shell out $10 for it.

(I'm not affiliated with k9s in any way except as a happy user)

It's been a smash hit at work. There is a bit of a learning curve, but nothing compared to kubectl.

: for changing "resource" types (and a few other miscellaneous things) / for filtering shift-? to see more commands

It's really better than any GUI I've used. I like it better than Weave Scope, Lens, and Rancher.
and, oh-my-zsh's kubectl plugin, to abbreviate more commands and which should allow for one to add the current cluster to their prompt with a convenient alias to switch between clusters (kcuc <config context>)
Works even better with fzf (aka "what's this subcommand called again ?").