v1.4.0 · stable release
Talk to Kubernetes. In plain English.¶
kube-q is an AI-native terminal client for Kubernetes. Query, debug, and operate any cluster the way you think — with streaming answers, session memory, human-in-the-loop approvals, and a full browser REPL.
Why kube-q
A Kubernetes client that understands you¶
Stop context-switching between docs, cheat-sheets and your terminal. Ask a question, get an answer — with the evidence right there.
-
Plain-English Queries
No more kubectl reference card. Ask "why are my pods crashing in production?" and get a structured, expert-level answer in seconds.
-
Persistent Session Memory
Every conversation is saved locally in SQLite. Resume any past session, search across all history with full-text FTS5 queries, branch at any turn.
-
Human-in-the-Loop Safety
Before a destructive action runs,
kube-qpauses and shows you the exact command, risk level and diff. You approve — or deny. -
File Attachments
Embed YAML manifests, logs, configs and more with
@filename. The AI sees full file contents inline alongside your question. -
Browser Terminal
The full
kqREPL in any browser via Docker — xterm.js, WebSocket, node-pty. No duplicated logic. Every command, every stream, identical. -
Token & Cost Tracking
Every response shows token count and elapsed time.
/tokensgives a full breakdown with estimated dollar cost, configurable per model. -
Multi-Backend & Multi-Cluster
One CLI, three backends: kube-q server, direct OpenAI, or Azure OpenAI — pick with
--backend. Switch kubectl context live via/context, bundle cluster + keys into named profiles, add custom slash commands with plugins.
Install
Up and running in under a minute¶
Pick your flavour. One command and you're in.
Live demo
Real conversation, real cluster¶
This is a verbatim kube-q session — from a vague question to a safe, approved fix.
kube-q v1.4.0 | session abc123 | ns: production
────────────────────────────────────────────────────
You> why are the pods in the payment service crashlooping?
kube-q> Investigating... ━━━━━━━━━━━━━━━━━━━━ (3 tool calls)
The payment-service pods are in CrashLoopBackOff due to a missing
environment variable: DATABASE_URL is not set in the deployment spec.
The container exits immediately with:
Error: required env DATABASE_URL is not set
Fix:
┌─────────────────────────────────────────────────────────────┐
│ kubectl set env deployment/payment-service \ │
│ DATABASE_URL=postgres://db.prod.svc:5432/payments │
└─────────────────────────────────────────────────────────────┘
(1.8s · 820 tokens)
You> apply the fix
kube-q> ╭─ Action requires approval ──────────────────────────╮
│ kubectl set env deployment/payment-service \ │
│ DATABASE_URL=postgres://db.prod.svc:5432/ │
│ │
│ Risk: medium · namespace: production │
│ Type /approve to proceed or /deny to cancel. │
╰─────────────────────────────────────────────────────╯
HITL> /approve
kube-q> Done. Rollout triggered. Monitoring...
All 3 pods are Running (45s).
Comparison
kube-q vs. raw kubectl¶
Both have their place — kube-q is built for the moments when you'd rather think out loud than recite syntax.
| Capability | raw kubectl | kube-q |
|---|---|---|
| Natural-language queries | ✗ | ✓ streaming |
| Multi-resource root-cause analysis | manual (logs + events + describe) | ✓ automatic |
| Persistent session history | shell history only | ✓ SQLite + FTS5 search |
| Conversation branching | ✗ | ✓ /branch |
| Human-in-the-loop approvals | ✗ | ✓ for destructive ops |
| Token & cost accounting | N/A | ✓ per-response + session |
| Browser REPL | ✗ | ✓ Docker image |
| Python SDK | client-go | ✓ sync & async |
How it works
Architecture at a glance¶
Everything runs through a streaming backend. Your cluster credentials never leave the server.
sequenceDiagram
participant U as You
participant K as kube-q CLI
participant B as kube-q Backend
participant C as Kubernetes Cluster
U->>K: "why are my pods crashing in production?"
K->>B: POST /chat (streaming SSE)
B->>C: kubectl get pods, logs, events
C-->>B: pod state, log tail, events
B-->>K: token stream (real-time)
K-->>U: rendered markdown answer
note over K,U: HITL pause if destructive action detected
Built for
Use cases we've heard¶
From the first-time learner to the 3 AM on-call responder.
Incident response¶
First signal of trouble, you ask kube-q what changed. It correlates events, logs and recent rollouts so you stop hunting and start deciding.
Learning k8s¶
A junior engineer can ask "what does a readiness probe do for this pod?" and get an answer grounded in the actual manifest — not a blog post.
Safer rollouts¶
Destructive actions pause for an explicit /approve. Risk level and blast-radius are surfaced before anything touches the cluster.
Forensic search¶
/search "oom killed" walks every past session. Every investigation becomes institutional memory for the next one.
Scenario exploration¶
/branch forks a conversation the moment you want to try a different fix — without losing the original line of reasoning.
Automation & bots¶
Drive kube-q from a script or chatbot via the Python SDK. The same streaming, same HITL, same audit trail.
What's included
One project. Three surfaces.¶
Pick the interface that fits the moment — they all share the same backend and session store.
-
Terminal Client
The
kqcommand — a feature-rich interactive REPL built onprompt_toolkitwith Tab-completion, command history, multi-line input, rich markdown rendering, and a full set of slash commands. -
Python SDK
Use
KubeQClient(sync) orAsyncKubeQClientdirectly in scripts, notebooks, or your own tools — no CLI required. Full streaming and event-model support. -
Browser Terminal
A Docker image that runs the full
kqREPL in any browser via xterm.js + WebSocket + node-pty. Embeddable in iframes. Each tab is an isolated process.
kube-q turns the terminal into a conversation. The things I used to copy-paste from Stack Overflow — describe, get events, logs --previous, top pods — all just happen when I ask a question. It's the shortest path from "something's wrong" to "here's what and here's why."
— The tool the author wishes they'd had on every 3 AM page.
Ready to try it?¶
Install in one command. Point at your backend. Start asking questions.