How to Install k9s on Ubuntu: The Terminal UI for Kubernetes
k9s is a terminal user interface for Kubernetes that replaces repetitive kubectl typing with a live, navigable dashboard. Rather than polling the API by hand, you watch pods, deployments, and services update in real time, then act on them with single keystrokes: view logs, exec into a container, port-forward, or edit a manifest without ever leaving the terminal.
For anyone who administers clusters, k9s is one of those tools that pays for itself within an hour. It keeps the low-level control of the command line while removing the friction, and because it is a single Go binary it works beautifully over SSH on remote hosts.
On Ubuntu, k9s is absent from the default archives, and third-party snaps or tarballs often trail behind upstream. The unofficial deb.griffo.io repository fixes that by publishing a current, prebuilt package you install and update with plain apt.
What Makes k9s Special?
- ๐ Real-time resource tracking - Continuously watches your cluster and reflects changes the instant they happen.
- โจ๏ธ Vim-style command prompt - Drive everything from a
:prompt with fast, discoverable commands. - ๐ Logs and shells on demand - Tail container logs or drop into a shell in a single keypress.
- ๐จ Custom skins - Restyle the whole interface with YAML skins to fit your palette.
- ๐ Plugins and hotkeys - Wire arbitrary commands to keys for bespoke workflows.
- ๐งญ Effortless context switching - Move between clusters and namespaces without restarting.
- ๐ Live metrics - Shows CPU and memory usage where the metrics server is installed.
- โก Zero runtime dependencies - Just one small, fast binary.
Why Use the deb.griffo.io Repository?
- Simple installs and upgrades through APT, exactly like any other Ubuntu package.
- Automatic dependency handling courtesy of the packaging.
- Tracks upstream releases closely, so new k9s versions arrive promptly.
- No source builds and no wrestling with Go toolchains or manual tarballs.
- Supports current Ubuntu releases (Jammy, Noble, and newer).
Prerequisites
Make sure the following are in place first:
- An Ubuntu system (Jammy 22.04 LTS, Noble 24.04 LTS, or newer)
sudoprivilegescurlinstalled (sudo apt install curlif needed)- A valid
kubeconfig(usually~/.kube/config) pointing at a cluster
Step 1: Add the deb.griffo.io Repository
Register the signing key and repository with APT:
# Create the keyrings directory
sudo install -d -m 0755 /etc/apt/keyrings
# Download and install the repository GPG key
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
# Add the repository (auto-detects your distro codename)
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
# Update the package list
sudo apt update
Step by step, this does the following:
- Creates
/etc/apt/keyringswith correct permissions to hold repository signing keys. - Fetches and de-armours the GPG key so APT can verify that packages are authentic.
- Adds the sources entry, auto-detecting your Ubuntu codename via
lsb_release -sc. - Updates the package index so APT sees the newly available packages.
Step 2: Update the Package List
If you did not run the last line above, refresh the index now:
sudo apt update
Step 3: Install k9s
Install with APT:
sudo apt install k9s
APT downloads the latest packaged k9s and resolves any dependencies for you.
Step 4: Verify the Installation
k9s exposes a version subcommand instead of a --version flag:
k9s version
Expect output along these lines:
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Version: v0.32.5
Commit: 9f2c4d1a6b3e7c8f0a1d2e3f4b5c6d7e8f9a0b1c
Date: 2026-07-30T10:15:42Z
Getting Started with k9s
First Launch
Run k9s with no arguments to open it against your current context:
# Use the current kubectl context
k9s
# Jump straight to a specific context and namespace
k9s --context production -n default
Navigation is entirely keyboard-driven through the : prompt. Type a resource type and press Enter:
:pods
:deploy
:svc
:cm
:secrets
Press ? for the complete keybinding reference and Esc to step back out of any screen.
Acting on Resources
Highlight a resource and use single-key actions:
l- stream the podโs logss- open a shell in a containerd- describe the objecte- edit its manifest in$EDITORShift-f- start a port-forwardCtrl-d- delete the resource after a confirmation
Filter any list by pressing / and typing part of a name, which keeps large namespaces manageable.
Namespaces and Contexts
Switching scope is the everyday superpower of k9s:
:ns # choose a namespace
:ctx # choose a cluster context
Picking an entry re-points every live view instantly, with no restart required.
Configuration and Skins
k9s reads its configuration from the XDG config path. On Ubuntu that is:
~/.config/k9s/config.yaml
Place skin files in ~/.config/k9s/skins/ and select one from the config:
k9s:
ui:
skin: nord
refreshRate: 2
Run k9s info to print the exact paths k9s uses on your machine.
Observing Safely
To browse a sensitive cluster with no chance of an accidental change, start in read-only mode:
k9s --readonly
Every destructive action is disabled, which makes this a good way to share a live view during an incident review.
Keeping k9s Updated
Since k9s comes from the repository, it updates with the rest of the system:
sudo apt update && sudo apt upgrade
Other Tools from deb.griffo.io
The repository ships many terminal tools that complement a Kubernetes workflow:
- lazydocker - A terminal UI for Docker, handy for local container work.
- lazygit - A slick terminal UI for Git.
- zellij - A multiplexer for running k9s next to logs and a shell.
- yq - A command-line YAML processor for editing manifests.
Troubleshooting
GPG or Key Errors
If APT reports the repository is not signed, re-import the key:
sudo rm -f /etc/apt/keyrings/deb.griffo.io.gpg
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Package Not Found
If APT cannot locate the k9s package:
- Re-run
sudo apt updateto refresh the index. - Verify your Ubuntu release is supported (Jammy, Noble, or newer).
- Check the sources entry:
cat /etc/apt/sources.list.d/deb.griffo.io.list
No Clusters Appear
If k9s launches but shows nothing, it likely cannot read your kubeconfig:
# Verify kubectl connectivity first
kubectl cluster-info
# Point k9s at an explicit config if required
k9s --kubeconfig ~/.kube/config
Confirm that KUBECONFIG is exported in the shell you launch k9s from.
Uninstalling
To remove the package:
sudo apt remove k9s
To also drop the repository:
sudo rm -f /etc/apt/sources.list.d/deb.griffo.io.list
sudo rm -f /etc/apt/keyrings/deb.griffo.io.gpg
sudo apt update
Conclusion
k9s condenses the day-to-day grind of Kubernetes operations into a fast, keyboard-first dashboard, and it becomes indispensable once it is part of your toolkit. On Ubuntu, installing it from deb.griffo.io gives you a current build that upgrades cleanly with apt upgrade.
Set the repository up once and k9s behaves like any other managed package, ready to move forward with the rest of your system.
Resources
Disclaimer: The deb.griffo.io repository is an unofficial community project and is not affiliated with the official Debian or Ubuntu projects, or with the upstream k9s project.