A terminal UI for browsing and managing Kubernetes resources. Navigate clusters, namespaces, and resources (Pods, PVCs, StatefulSets) with real-time updates, view descriptions and logs, and perform actions -- all without leaving the terminal.
+--------------------------------------------------------------------+
| Context: [gke-prod v] | Namespace: [default v] | Type: [Pods v] |
+--------------------------------------------------------------------+
| NAME | STATUS | AGE | RESTARTS | NODE |
|--------------------------------------------------------------------|
| > my-pod-0 | Running | 3d2h | 0 | node-a1 |
| my-pod-1 | Pending | 1h | 0 | <none> |
+--------------------------------------------------------------------+
| q:Quit Tab:Selector j/k:Nav Enter:Detail l:Logs d:Delete r:Restart|
+--------------------------------------------------------------------+
Fuzzy search (Ctrl+F) searches across all clusters, namespaces, and resource types:
+--------------------------------------------------------------------+
| Search (Ctrl+F) |
| op-geth█ |
+--------------------------------------------------------------------+
| NAME | TYPE | NAMESPACE | CLUSTER |
|--------------------------------------------------------------------|
| > op-geth-node-0 | Pods | ethereum | gke-prod |
| op-geth-node-1 | Pods | ethereum | gke-prod |
| op-geth-node-0 | Pods | ethereum | gke-staging |
+--------------------------------------------------------------------+
| Esc:Back Down/Up:Nav Enter:Detail Type to search... |
+--------------------------------------------------------------------+
- Multi-cluster support -- switch between kubeconfig contexts on the fly
- Resource browsing -- Pods, PersistentVolumeClaims, StatefulSets with type-specific columns
- Real-time updates -- watches resources via the Kubernetes API; changes appear automatically
- Detail view -- formatted description with conditions, containers, events, and full YAML
- Log streaming -- tail pod logs with follow mode, scroll through history
- Actions -- delete, restart (rollout restart for StatefulSets), edit YAML in
$EDITOR - Fuzzy search --
Ctrl+Fto search across all clusters, namespaces, and resource types at once; results show name, type, namespace, and cluster side by side - Filtering -- search resources by name with
/ - Color-coded status -- green for Running/Bound, yellow for Pending, red for Failed/CrashLoopBackOff
- Rust 1.75+ -- install via rustup
- A valid kubeconfig at
~/.kube/config(or$KUBECONFIG)
cargo install ktermcargo install --git https://github.com/piersy/kterm.gitgit clone https://github.com/piersy/kterm.git
cd kterm
cargo build --releaseThe binary is at ./target/release/kterm. Copy it somewhere on your $PATH:
cp target/release/kterm ~/.local/bin/cargo install --path .This builds and installs kterm to ~/.cargo/bin/, which is on your $PATH if you used rustup.
ktermThe app reads your kubeconfig and connects to the current context. If no cluster is reachable, it starts in offline mode.
| Key | Action |
|---|---|
q / Ctrl+c |
Quit (or back from subview) |
Tab / Shift+Tab |
Cycle focus: Context -> Namespace -> Type -> List |
Ctrl+f |
Open fuzzy search across all clusters |
? |
Help overlay |
| Key | Action |
|---|---|
h / Left |
Previous value |
l / Right |
Next value |
| Key | Action |
|---|---|
j / Down |
Move selection down |
k / Up |
Move selection up |
Enter |
Open detail view |
l |
View logs (Pods only) |
d |
Delete (with confirmation) |
r |
Restart (with confirmation) |
e |
Edit YAML in $EDITOR |
/ |
Filter by name |
Ctrl+f |
Fuzzy search all clusters |
| Key | Action |
|---|---|
Esc |
Back to list |
Down / Tab |
Move selection down |
Up / Shift+Tab |
Move selection up |
Enter |
Open detail view for selected result |
| Type | Filter results with fuzzy matching |
Backspace |
Remove last character from search |
| Key | Action |
|---|---|
Esc |
Back to list |
j / k |
Scroll up/down |
g / G |
Jump to top/bottom |
l |
View logs |
d |
Delete |
r |
Restart |
e |
Edit |
| Key | Action |
|---|---|
Esc |
Back to list |
f |
Toggle follow mode |
j / k |
Scroll up/down |
g / G |
Jump to top/bottom |
src/
main.rs Entry point, terminal setup, async event loop
app.rs App state, key handling, action dispatch
event.rs AppEvent enum, EventHandler (crossterm + tick + K8s)
types.rs ResourceType, ViewMode, Focus, ResourceItem
ui/
mod.rs Top-level render(), layout splitting
header.rs Context/namespace/type selector bar
resource_list.rs Table widget with resource rows
detail.rs Scrollable description panel
logs.rs Log viewer with follow mode
help.rs Footer keybindings, confirmation dialog
search.rs Fuzzy search full-screen view
k8s/
mod.rs Re-exports
client.rs K8sManager: kubeconfig, context switching
resources.rs Watch streams, describe, resource conversion
actions.rs Delete, restart, edit/apply YAML
logs.rs Pod log streaming
The event loop multiplexes three sources into a single tokio::sync::mpsc channel:
- Crossterm -- keyboard and resize events
- Tick timer -- 250ms interval for UI updates (spinner, error timeout)
- K8s watcher --
kube::runtime::watcherstreams withBTreeMapcaching
cargo test102 tests:
- 56 unit tests -- key handling, state transitions, type logic, fuzzy search (
src/app_test.rs) - 46 integration tests -- full UI rendering via ratatui
TestBackend, verifying rendered output for all views, search, and navigation flows (src/ui_test.rs)
- ratatui + crossterm -- TUI rendering and input
- kube-rs + k8s-openapi -- Kubernetes API client
- tokio -- async runtime
MIT