Cloud Native 9 min read

Master K9s: Install, Run, and Navigate Kubernetes via Terminal UI

This guide walks you through installing K9s on Windows, Linux, and Docker, explains its core features like XRay, Pulse, and Popeye, and provides essential hot‑key shortcuts for efficient Kubernetes cluster management using a terminal UI.

Open Source Linux
Open Source Linux
Open Source Linux
Master K9s: Install, Run, and Navigate Kubernetes via Terminal UI

Preface

K9s

is a terminal‑UI based Kubernetes management tool that offers a richer experience than kubebox.

The article demonstrates installing k9s on Windows, Linux, and via Docker.

Simple hot‑key usage is covered.

Readers are invited to point out any inaccuracies.

"I only desire to put my true nature into life, why is it so hard?" – Hermann Hesse, Demian K9s is a terminal‑based tool for managing Kubernetes clusters, aiming to simplify cluster administration. It is similar to kubebox but adds continuous monitoring, quick commands, and resource interaction. When you can only use a terminal, k9s is an excellent choice.

K9s

provides special functions such as the xray view for resource dependencies, the pulse view for cluster health, and the popeye scanner that reports configuration issues.

Installation

Windows client

PS C:\Program Files> choco install k9s
Chocolatey v1.1.0
Installing the following packages:
k9s
... (installation output truncated for brevity) ...

After downloading, place your kubeconfig file in the default location.

PS C:\Users\山河已无恙\.kube> ls

    Directory: C:\Users\山河已无恙\.kube

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
... (listing truncated) ...
PS C:\Users\山河已无恙\.kube> cat .\config
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: ...

Start K9s from the command line:

PS C:\ProgramData\chocolatey\lib\k9s\tools> .\k9s.exe

Linux client

Download the package: # curl -sS https://webinstall.dev/k9s | bash Extract and run:

# tar -zxvf k9s_Linux_x86_64.tar.gz
LICENSE
README.md
k9s
# ls
k9s  k9s_Linux_x86_64.tar.gz  LICENSE  README.md
# ./k9s

Docker installation

You can also run K9s directly with Docker:

# docker run --rm -it -v ~/.kube/config:/root/.kube/config docker.io/derailed/k9s

View resource status information:

View resource dependency relationships:

Hot‑keys

Show active keyboard mnemonics and help: ? Show all resource aliases: ctrl-a Exit K9s: :q, ctrl-c View a resource (e.g., pods):

:
po⏎

View a resource in a specific namespace:

:
alias namespace⏎

Filter resources:

/
filter⏎

Inverse regex filter:

/
! filter⏎

Filter by labels:

/
-l label-selector⏎

Fuzzy find a resource:

/
-f filter⏎

Cancel view/command/filter mode: <esc> Describe, view, edit, view logs, etc.: d, v, e, l

Switch Kubernetes context:

:
ctx⏎

or ctx context-name⏎ Switch Kubernetes namespace:

:
ns⏎

Save a screenshot:

:
screendump

or sd⏎ Delete a resource (confirm with TAB/ENTER): ctrl-d Kill a resource (no confirmation): ctrl-k Launch pulses view:

:
pulses

or pu⏎ Launch XRay view:

:
xray RESOURCE [NAMESPACE]⏎

Launch Popeye view:

:
popeye

or

pop⏎

References

https://github.com/derailed/k9s

https://k9scli.io

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerKuberneteslinuxWindowsInstallationTerminal UIk9s
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.