DEV Community

Sohana Akbar
Sohana Akbar

Posted on

K9s — The Terminal UI That Made Me Love K8s Again

Let me be honest with you.

For the first two years of my Kubernetes journey, I was that person. You know the one. The person who says, “Kubernetes is amazing, but the CLI friction kills my flow.”

I had aliases for my aliases. I used kubectx and kubens religiously. I even built a messy bash script to tail logs from five pods at once. And still, debugging a rollout felt like doing surgery with oven mitts.

Then I found K9s.

And I swear to you: within ten minutes, I actually enjoyed managing my cluster again.

The Problem: Too Much Typing, Not Enough Seeing
Here’s the dirty secret of kubectl: it’s a single-purpose knife in a multi-course meal. Want to check pod status? kubectl get pods. Want to see logs? kubectl logs -f pod-name. Want to describe a deployment? New command. Scale it? Another command. Jump into a shell? You get the idea.

The cognitive load isn't the cluster—it’s the context switching between commands and namespaces.

K9s solves that by turning your terminal into a live, interactive cockpit.

What Is K9s, Really?
K9s is a Terminal UI (TUI) that watches your cluster in real time. It’s not a dashboard you open in a browser. It lives inside your terminal, respects your SSH config, uses your existing kubeconfig, and weighs essentially nothing.

But the magic isn't the tech specs. The magic is the ergonomics.

When you launch k9s, you don’t type --namespace. You don’t remember flags. You press : (colon) and type /pods, /deploy, /svc, or /ctx to switch contexts instantly.

Let me show you how my workflow changed.

Before vs. After K9s
Before (pure kubectl)
bash
kubectl get pods -n myapp

oh, pod is crashing

kubectl logs myapp-pod-7d8f9-abc -n myapp --tail=50

hmm, need to see events

kubectl describe pod myapp-pod-7d8f9-abc -n myapp | grep -A 5 Events

ok scale down

kubectl scale deploy/myapp -n myapp --replicas=0
That’s 4 commands, 2 copy-pastes, and one grep.

After (K9s)
k9s (enter)

: then ns (switch namespace to myapp)

Arrow keys to the crashing pod → press l (logs automatically stream)

Press d (describe) – reads like a man page, but instant

Press /deploy → select deployment → press s (scale) → type 0 → enter

No typing resource names. No looking up pod hashes. No --tail. No namespace typos.

That’s the difference between “managing YAML” and “piloting a cluster.”

The Features That Stole My Heart

  1. Vim-like navigation (if you know, you know)
    j/k to scroll, / to filter, : for commands, ? for help. It feels like home for anyone who lives in the terminal.

  2. Logs with infinite scroll and live tail
    Press l on any pod and watch logs update in real time. Press ctrl-s to save them to a file. Press esc to go back. No ctrl-c | kubectl logs dance.

  3. Popeye integration for cluster health
    K9s includes a built-in “Popeye” sanitizer. Press : then popeye and it scans your cluster for misconfigurations, deprecated APIs, and resource waste. It’s like a linter for your entire K8s setup.

  4. Command mode for everything
    Want to restart a deployment? Select it, press r. Port-forward? Select pod, press shift-f. Shell into a container? Select pod, press s. Everything is two keystrokes away.

  5. Screens and skins
    You can save multiple screens (pods + logs + events side by side) and customize the color theme. I use a purple-and-cyan theme that makes CrashLoopBackOff stand out like a warning light.

Real Talk: Is It Perfect?
No. Nothing is.

It’s not for scripting – obviously. You’ll still need kubectl in CI/CD.

Large clusters can lag – if you have 2,000 pods, initial load takes a few seconds.

The shortcut list is daunting at first. But after a week, you’ll be pressing ctrl-d to kill a pod without thinking.

But here’s the thing: I don’t want it to replace kubectl. I want it to replace fatigue.

How to Start (in 60 seconds)
bash

macOS

brew install k9s

Linux (via snap)

sudo snap install k9s

Or download from GitHub releases

https://github.com/derailed/k9s/releases

Then just run:

bash
k9s
That’s it. It reads your ~/.kube/config. It respects your current context. It just works.

The Moment I Knew I Was Hooked
We had a production incident. Three microservices failing. A ConfigMap typo. I needed to check logs from service A, events from namespace B, and scale down service C simultaneously.

Normally, I’d have five terminal tabs open, each with a different kubectl command running.

With K9s, I opened two splits in the same TUI: logs on the right, pod list on the left. I watched the error appear, fixed the ConfigMap in another window, and saw the pods restart in real time without refreshing anything.

My lead engineer looked over and said, “What the hell is that? Install it on my machine right now.”

That’s K9s.

Final Verdict
Kubernetes is powerful, but power without visibility is just chaos.

K9s doesn’t make K8s easier — it makes it visible, tactile, and fast. It turns a firehose of YAML and API calls into a dashboard that fits inside a single terminal window.

If you’re tired of typing kubectl get pods --all-namespaces | grep Pending, do yourself a favor.

Try K9s for one day.

You might just fall in love with K8s all over again.

Bonus tip: Add alias kk='k9s' to your .zshrc and thank me later.

Have you used K9s? What’s your favorite shortcut? Drop a comment below — I’ll trade you my skin config for yours. 🚀

Top comments (0)