Skip to content

damahua/kdash

Repository files navigation

kdash

A terminal-based Kubernetes dashboard with AI integration. Navigate clusters, inspect resources, tail logs, and ask AI questions — all without leaving the terminal.

⎈ kdash ─ kubernetes dashboard

╭─────────────────────────────────────────────────────────╮
│ ⎈ minikube │ staging │ Deployments          3 items     │
╰─────────────────────────────────────────────────────────╯
┌─────────────────────────────────────────────────────────┐
│ ◆ 1:Deploy  2:STS  3:DS  4:Pods  5:Job ...             │
│                                                         │
│  NAME          READY  UP-TO-DATE  AVAILABLE  AGE        │
│ ❯ nginx        3/3    3           3          5d12h      │
│   redis        1/1    1           1          5d12h      │
│   api-gateway  2/2    2           2          3d4h       │
└─────────────────────────────────────────────────────────┘
j/k nav  ↵ open  1-0 tab  [] cycle  n ns  l logs  a ai

Why

Web-based Kubernetes dashboards require complex authentication flows and context switching. As a developer, you already have kubectl access in your terminal. kdash puts a navigable, keyboard-driven resource browser right where you work.

Features

  • 14 resource types — Deployments, StatefulSets, DaemonSets, Pods, Jobs, CronJobs, Services, Ingresses, ConfigMaps, Secrets, PVCs, PVs, Events, Nodes
  • Keyboard-driven — vim-style navigation (j/k, g/G), number keys for tabs, drill-down with Enter/Esc
  • Real-time log tailing — press l on any pod to stream logs with pause, scroll, and previous container support
  • AI analysis — press a to ask Claude about any resource (auto-includes kubectl describe context)
  • Copyable commands — press y to get context-aware kubectl commands copied to clipboard
  • Read-only — no mutations from the UI. Dangerous operations are surfaced as copyable commands
  • Namespace switching — press n to switch namespaces instantly
  • Drill-down with sub-tabs — enter a Deployment to see its Overview, Pods, Events, and YAML
  • Filter — press / to filter any resource list

Install

npm install -g kdash

Or run directly:

npx kdash

Prerequisites

  • Node.js 20+
  • kubectl configured with cluster access
  • claude CLI (optional, for AI features) — install

Usage

kdash

Select a Kubernetes context, then navigate:

Keybindings

Key Action
j/k ↑/↓ Navigate rows
Enter Drill into resource
Esc Go back
1-9 0 Switch to tab 1-10
[ ] Cycle tabs (prev/next)
g / G Jump to top / bottom
/ Filter current list
n Switch namespace
l Tail pod logs
a Ask AI about resource
y Copy kubectl command
f Fullscreen panel
p / P Pause logs / previous container
Tab Switch pane focus
? Show help
q Quit

Resource Tabs

# Tab Category
1 Deployments Workloads
2 StatefulSets Workloads
3 DaemonSets Workloads
4 Pods Workloads
5 Jobs Batch
6 CronJobs Batch
7 Services Networking
8 Ingresses Networking
9 ConfigMaps Config
0 Secrets Config
] PVCs, PVs Storage
] Events, Nodes Cluster

AI Integration

Press a on any resource to ask Claude a question. kdash automatically runs kubectl describe and passes the output as context. Follow-up questions maintain conversation history (last 5 exchanges).

Requires the Claude CLI installed and authenticated.

Log Viewer

Press l on a pod to tail its logs in real-time. The log panel opens at the bottom:

  • j/k — scroll through logs
  • g/G — jump to top/bottom
  • f — fullscreen
  • p — pause/resume tailing
  • P — show previous container logs (for crashed pods)
  • Esc — close

Development

git clone https://github.com/damahua/kdash.git
cd kdash
npm install

# Set up a local test cluster
bash scripts/setup-test-cluster.sh

# Run in dev mode
npm run dev

# Run tests
npm test

# Build
npm run build

Tech Stack

  • TypeScript + Ink (React for terminals)
  • @kubernetes/client-node — official Kubernetes JS client
  • claude CLI — AI analysis via claude -p

License

MIT

About

Terminal-based Kubernetes dashboard with AI integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors