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 with Krust 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 --helpPreflight 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 -AFor YAML editing, set your preferred editor:
export EDITOR=vim
export VISUAL=codeCommand Line
| Command | Use |
|---|---|
k9r | Start K9r using the current kube context. |
k9r -n default, --namespace default | Start scoped to a namespace. |
k9r -A, --all-namespaces | Start across all namespaces. |
k9r --context prod-west | Start in a specific kube context. |
k9r -c deploy, --command deploy | Start on a resource view, using the same syntax as command mode. |
k9r --readonly | Block mutating actions such as delete. Can also be set in config.yaml globally or per context. |
k9r --no-color | Disable colors. |
k9r info | Print config, log, and screen-dump locations. |
k9r version | Print version and build info (--short for the version only). |
k9r --help | Show CLI options. |
Resource Aliases
Open command mode with :, then jump directly to a resource view.
| Alias | View |
|---|---|
:po, :pods | Pods |
:dp, :deploy | Deployments |
:svc | Services |
:events | Events |
:workloads, :wk | Workloads overview |
:helm, :hm | Helm releases |
:pf | Active port-forwards |
:security | Security view |
:xray deploy [namespace] | Xray topology for a resource |
:can delete pods | Who-can RBAC query |
:rbac | RBAC subjects |
:ctx, :ctx name | Context picker, or switch context |
:ns, :ns name | Namespace picker, or switch namespace |
:all | All namespaces |
:po kube-system, :po /api | Open a resource scoped to a namespace or with a text filter |
Navigation
| Key | Action |
|---|---|
| j / k, arrows | Move selection. |
| g / G | Jump to top or bottom. |
| Enter | Open the selected item. |
| / | Filter the current view. |
| : | Open command mode. |
| Esc | Return to the previous view. |
| ? | Show help. |
| Ctrl+A | Show resource aliases. |
Actions
Actions run against the currently selected resource. Mutating actions require explicit confirmation.
| Key | Action |
|---|---|
| d | Describe/detail. |
| Shift+E | Events for the selected resource. |
| l | Open logs. |
| p | Open previous logs where available. |
| y | View YAML. |
| e | Edit YAML with your editor. |
| s | Open shell. |
| a | Attach to container. |
| t | Transfer files to or from a pod. |
| Shift+F | Start port-forward. |
| Ctrl+D | Delete with confirmation. |
| Ctrl+K | Kill pod (grace period 1s) with confirmation. |
| Shift+R | Open 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.
| Key | Action |
|---|---|
| G | Follow tail. |
| s | Pause or resume follow. |
| a | Toggle all containers. |
| p | Toggle previous logs. |
| / | Filter logs; n / N jump between matches. |
| 0–6 | Set a tail, head, or since preset. |
| t | Toggle timestamps. |
| w | Toggle wrapping. |
| Shift+C | Clear logs. |
| c | Copy logs. |
| Ctrl+S | Save 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 ~/.local/share/k9r/logs/tui.log (or $XDG_DATA_HOME/k9r/logs/tui.log) and rotated when it grows. Saved tables go to ~/.local/share/k9r/screen-dumps/<context>/. Saved logs and YAML use k9r-... filenames in the system temp directory. Configuration lives in ~/.config/k9r/. Run k9r info to print the exact paths.