K9r

A faster Kubernetes terminal UI powered by the same Rust core behind Krust.

K9r is the terminal surface for Krust's Kubernetes engine. It keeps cluster state warm locally, streams changes through watches, and renders from cache first so navigation stays responsive on busy clusters.

Status

K9r is included in Krust v1.4.3 as a macOS-first terminal preview. The goal is familiar k9s-style muscle memory with Krust's shared Rust core underneath.

Installation

Install Krust from the Homebrew tap. The package includes both the native macOS app and the k9r terminal command:

brew install --cask vanchonlee/tap/krust
k9r --help

Preflight Checks

K9r uses your existing kubeconfig. If kubectl can read your cluster, K9r should be able to use the same access.

kubectl config current-context
kubectl get pods -A

For YAML editing, set your preferred editor:

export EDITOR=vim
export VISUAL=code

Command Line

CommandUse
k9rStart K9r using the current kube context.
k9r --namespace defaultStart scoped to a namespace.
k9r --context prod-westStart in a specific kube context.
k9r --helpShow CLI options.

Resource Aliases

Open command mode with :, then jump directly to a resource view.

AliasView
:po, :podsPods
:deployDeployments
:svcServices
:eventsEvents
:helmHelm releases
:pfActive port-forwards
:securitySecurity view
:ctxContext picker
:nsNamespace picker

Navigation

KeyAction
j / k, arrowsMove selection.
g / GJump to top or bottom.
EnterOpen the selected item.
/Filter the current view.
:Open command mode.
EscReturn to the previous view.
?Show help.
Ctrl+AShow resource aliases.

Actions

Actions run against the currently selected resource. Mutating actions require explicit confirmation.

KeyAction
lOpen logs.
pOpen previous logs where available.
yView YAML.
eEdit YAML with your editor.
sOpen shell.
aAttach to container.
Shift+FStart port-forward.
Ctrl+DDelete with confirmation.
Shift+ROpen rollout revision history where supported.

Logs

K9r reuses Krust's log pipeline. Open logs from pods or containers, follow the tail, toggle timestamps, wrap long lines, clear the view, or save the current buffer.

KeyAction
GFollow tail.
sPause or resume follow.
aToggle all containers.
tToggle timestamps.
wToggle wrapping.
Shift+CClear logs.
Ctrl+SSave logs.

Why K9r Is Faster Than k9s

K9r keeps pod and resource state warm in a local runtime. Kubernetes updates stream into that runtime through watches, and the UI renders from hot data first instead of blocking every navigation step on a fresh API call. API refreshes happen in the background, so filtering, selection, and workload-to-pod drill-downs stay responsive on noisy clusters.

Runtime Files

K9r writes runtime logs locally so tool debugging does not interrupt the cluster workflow. TUI stderr is written to /tmp/k9r-tui.log. Saved tables, logs, and YAML exports use k9r-... filenames in the system temp directory.