Skip to content

Installing K9s

Outcome: K9s installed, and the install proven — version printed, config locations named — before any cluster is involved. K9s is a single self-contained program with no runtime dependencies: no Python, no Java, nothing to keep fed. That shapes every install route.

What you need first

A terminal with a decent font and 256-colour support — K9s draws boxes, colours statuses, and (by default) small icons; a terminal that lacks the icon characters can be told to go without (chapter 11's noIcons setting, or the skin you choose). And, for the guide proper from chapter 4 on, a kubeconfig that reaches a cluster. For the install checks below you need neither a cluster nor kubectl.

Route 1: the release binary (what the lab ran)

The project publishes ready-built archives on its GitHub releases page (github.com/derailed/k9s/releases) for Linux, macOS and Windows, in several processor flavours. Download the one for your machine, unpack it, put the single k9s program somewhere on your path:

curl -LO https://github.com/derailed/k9s/releases/download/v0.51.0/k9s_Linux_amd64.tar.gz
tar xzf k9s_Linux_amd64.tar.gz
sudo install -m 0755 k9s /usr/local/bin/

Check: the lab ran exactly this route (a manual unpack, no system install, in a scratch folder). Its first words:

Version:    v0.51.0
Commit:     558caafe7ba067467de46b320cc22ef11fef9c34
Date:       2026-06-06T14:04:25Z

That is k9s version, kept whole in k9s-lab/transcripts/t00-version.txt — note the dog logo it prints above the numbers; --splashless and friends (chapter 2) exist because K9s enjoys its branding. Version numbers will have moved on by the time you read this; download the latest release rather than copying the lab's, and expect this guide's screens — captured from v0.51.0 — to differ in details, not in shape.

Route 2: package managers

If you prefer your system to track the install, the project documents these routes (documented-only in this guide; the lab used route 1):

  • Homebrew (macOS and Linux): brew install k9s
  • MacPorts: sudo port install k9s
  • Windows: winget install k9s, or Chocolatey choco install k9s, or Scoop scoop install k9s
  • Arch Linux: pacman -S k9s
  • FreeBSD: pkg install k9s
  • Shell completion scripts are also generated by the program itself: k9s completion --help shows how (verified in the lab — completion is one of the four subcommands its top-level help lists, alongside help, info and version).

Whichever route, the program is the same and the checks below are identical. One warning that applies to every packaged route: distributions sometimes lag the releases page by a version or two, and K9s moves quickly. If a chapter's key does nothing, check k9s version against the releases page before blaming the chapter.

Prove it: version and info

Two commands, neither of which needs a cluster, close the install out:

k9s version     # the numbers above
k9s info        # where everything lives

k9s info prints the program's revision and the full list of paths: config, custom views, jumps, plugins, hotkeys, aliases, skins, per-context configs, logs and benchmarks. The lab's output (from a run with the XDG folders pointed at scratch space, which is why the paths look unusual) is kept as k9s-lab/transcripts/t02-info.txt. On your machine expect:

  • Linux: config under ~/.config/k9s, data under ~/.local/share/k9s, logs under ~/.local/state/k9s
  • macOS: ~/Library/Application Support/k9s
  • Windows: %LOCALAPPDATA%\k9s

Two honest details from the lab's run, so they do not startle you: on a machine that has never run K9s, k9s info ends with an ERROR Unable to reads k9s config file line — that is simply "the config file does not exist yet". Your first real start creates it, defaults and all (chapter 2 showed the log line the lab caught: [CONFIG] Saving K9s config to disk). And the whole of k9s --help — every flag, including --kubeconfig, --context, --namespace, --readonly and --command — is kept as k9s-lab/transcripts/t01-help.txt; chapter 4 puts the useful ones to work.

Upgrading and removing

Upgrading is replacing the binary (or re-running your package manager); K9s keeps its settings in its own folders and migrates them itself. Removing is the reverse: delete the binary and, if you like, the k9s folders k9s info named. Nothing K9s does lives anywhere else — it writes no systemd units, touches no cluster state merely by being installed, and leaves no agent behind. A cluster never knows K9s visited except through the ordinary API calls it made while running.