How to Install k9s on Debian: The Terminal UI for Kubernetes
k9s is a terminal-based UI that lets you observe and manage your Kubernetes clusters without memorising a wall of kubectl incantations. Instead of typing kubectl get pods -n namespace -o wide and re-running it to see changes, k9s gives you a live, keyboard-driven dashboard that continuously watches your resources and lets you drill into logs, exec into containers, and edit manifests in seconds.
If you spend any real time operating Kubernetes, k9s quickly becomes muscle memory. It sits somewhere between the raw power of kubectl and the heaviness of a web dashboard, and it runs entirely inside your terminal, which makes it ideal for working over SSH on jump hosts and bastion servers.
The catch on Debian is that k9s is not in the official repositories, and the versions you might find elsewhere lag behind upstream. The unofficial deb.griffo.io repository solves this by shipping an up-to-date prebuilt .deb package that installs and updates cleanly with apt.
What Makes k9s Special?
- 📟 Live resource views - Continuously watches pods, deployments, services, and every other resource type in real time.
- ⌨️ Keyboard-first navigation - Jump between resources with a
:command prompt, just like Vim’s command line. - 📜 Instant logs and shells - Tail logs, exec into a container, or port-forward without leaving the UI.
- 🎨 Skins and customisation - Fully themeable via YAML skins to match your terminal colour scheme.
- 🔌 Plugins and hotkeys - Bind custom commands to keys to extend k9s with your own workflows.
- 🧭 Context and namespace switching - Hop between clusters and namespaces with a couple of keystrokes.
- 📈 Resource usage - Surfaces CPU and memory metrics when the metrics server is available.
- ⚡ Fast and lightweight - A single Go binary with no runtime dependencies.
Why Use the deb.griffo.io Repository?
- Easy installation and updates through the standard APT workflow.
- Automatic dependency management handled by the packaging.
- Always tracks upstream releases, so you get new k9s features shortly after they land.
- No compiling from source and no juggling of Go toolchains or release tarballs.
- Works across supported Debian releases (Bookworm, Trixie, and Sid).
Prerequisites
Before you begin, make sure you have:
- A Debian-based system (Bookworm 12, Trixie 13, or Sid)
sudoprivilegescurlinstalled (sudo apt install curlif it is missing)- A working
kubeconfigso k9s has a cluster to connect to (typically~/.kube/config)
Step 1: Add the deb.griffo.io Repository
Add the signing key and the repository to your APT configuration:
# 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
Here is what each step does:
- Create the keyrings directory - Ensures
/etc/apt/keyringsexists with sane permissions for storing repository keys. - Install the GPG key - Downloads the repository’s signing key and stores it in de-armoured form so APT can verify package signatures.
- Add the repository - Writes a sources entry that uses the key above and auto-detects your Debian codename with
lsb_release -sc. - Update the package list - Refreshes APT so it knows about the new packages.
Step 2: Update the Package List
If you skipped the final command above, refresh the package index now:
sudo apt update
Step 3: Install k9s
Install the package with APT:
sudo apt install k9s
This pulls in the latest packaged k9s and any dependencies.
Step 4: Verify the Installation
k9s uses a version subcommand rather than a --version flag:
k9s version
You should see output similar to:
____ __.________
| |/ _/ __ \______
| < \____ / ___/
| | \ / /\___ \
|____|__ \ /____//____ >
\/ \/
Version: v0.32.5
Commit: 9f2c4d1a6b3e7c8f0a1d2e3f4b5c6d7e8f9a0b1c
Date: 2026-07-30T10:15:42Z
Getting Started with k9s
Launching and Navigating
Start k9s by simply running it. It reads your current kubectl context from ~/.kube/config:
# Launch against your current context
k9s
# Launch straight into a namespace
k9s -n kube-system
# Launch against a specific context
k9s --context staging
Once inside, everything is driven from the : command prompt. Type a resource name and press Enter:
:pods
:deploy
:svc
:ns
:events
Press ? at any time to open the built-in help with the full keybinding list, and Esc to back out of any view.
Working with Resources
With a resource highlighted, single keys act on it:
l- view logs for the selected pods- open a shell inside a containerd- describe the resourcee- edit the resource manifest in$EDITORCtrl-d- delete the resource (with confirmation)Shift-f- set up a port-forward
You can filter any list by pressing / and typing a pattern, which is invaluable on busy namespaces.
Switching Contexts and Namespaces
Multi-cluster work is where k9s shines:
:ctx # list and switch Kubernetes contexts
:ns # list and switch namespaces
Selecting an entry immediately re-points every view at the new context or namespace, so you never have to restart the tool.
Configuration and Skins
k9s stores its configuration under the XDG config directory. On Debian this is:
~/.config/k9s/config.yaml
You can drop skin files into ~/.config/k9s/skins/ and reference them from the config. A minimal skin selection looks like this:
k9s:
ui:
skin: dracula
liveViewAutoRefresh: true
To see the exact locations k9s reads on your machine, run:
k9s info
Read-Only and Safe Modes
When you just want to observe a production cluster without risking a stray keystroke, launch in read-only mode:
k9s --readonly
This disables every mutating action, which makes k9s a safe way to hand a cluster view to a colleague.
Keeping k9s Updated
Because k9s came from the repository, upgrades are part of your normal system maintenance:
sudo apt update && sudo apt upgrade
Other Tools from deb.griffo.io
The same repository packages plenty of other terminal tools that pair well with k9s:
- lazydocker - A terminal UI for Docker and docker-compose, perfect alongside k9s for local containers.
- lazygit - A fast terminal UI for Git operations.
- zellij - A terminal multiplexer to keep k9s, logs, and a shell side by side.
- yq - A command-line YAML processor, ideal for wrangling Kubernetes manifests.
Troubleshooting
GPG or Key Errors
If APT complains that the repository is not signed, re-add 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 install k9s reports that the package is unavailable:
- Run
sudo apt updateagain to make sure the index is current. - Confirm your Debian release is supported (Bookworm, Trixie, or Sid).
- Inspect the sources entry:
cat /etc/apt/sources.list.d/deb.griffo.io.list
k9s Cannot Connect to a Cluster
If k9s starts but shows no resources, it usually cannot find or use your kubeconfig:
# Confirm kubectl itself works
kubectl cluster-info
# Point k9s at an explicit kubeconfig if needed
k9s --kubeconfig ~/.kube/config
Make sure KUBECONFIG is exported in the same shell you launch k9s from.
Uninstalling
To remove k9s:
sudo apt remove k9s
To remove the repository as well:
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 turns Kubernetes operations from a stream of kubectl commands into a fluid, keyboard-driven experience, and it is the kind of tool you reach for every day once it is installed. On Debian, the deb.griffo.io repository is the cleanest way to get a current build and keep it updated with the rest of your system.
Add the repository once, and k9s becomes a first-class citizen of your package manager, ready to be upgraded alongside everything else on the machine.
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.