The AI command center for Kubernetes teams — investigate incidents, understand workloads, and plan safe changes through a team of specialist agents.
Why KubeMate · Capabilities · Architecture · Quickstart · Production · Security
Kubernetes gives teams tremendous control — and a tremendous amount of operational context to assemble under pressure. KubeMate turns that context into a focused conversation with specialists that understand pods, events, logs, deployments, services, nodes, rollout health, and Kubernetes manifests.
It is designed for platform teams that want AI assistance without handing a general-purpose chatbot an unbounded cluster credential.
- Diagnose from evidence. Ask one question and let the agent gather the relevant Kubernetes state instead of copying output between terminals.
- Use the right specialist. Troubleshooting, deployment, manifest design, and optimization are separate teammate profiles with distinct operating instructions.
- Keep humans in the loop. Read-only inspection is the default. Mutating actions become explicit proposals that require approval before execution.
- Deploy inside your boundary. Kubernetes access stays behind the official client library and a dedicated ServiceAccount RBAC boundary.
| Capability | What it does | Why it matters |
|---|---|---|
| Specialist teammates | Switch between troubleshooting, deployment, manifest, and optimization personas | The answer is shaped by the job, not a generic prompt |
| Group chat | Bring multiple Kubernetes specialists into one conversation | Ask diagnosis, rollout, and manifest questions in one thread; the first @mentioned teammate answers |
| Cluster inspection | Inspect pods, logs, events, deployments, services, and nodes | Ground recommendations in live cluster evidence |
| Approval workflow | Convert supported mutations into reviewable proposals | No silent changes from an AI response |
| Provider flexibility | Use OpenRouter, Groq, or NVIDIA model endpoints | Keep model choice aligned with your environment and policy |
| Production packaging | Build to GHCR and deploy with Kubernetes manifests | Move from local validation to a repeatable release path |
flowchart LR
U[Platform engineer] --> W[KubeMate web app]
W --> C[Chat and approval API]
C --> A[LangGraph agent runtime]
A --> M[Configured model provider]
A --> K[Private Kubernetes agent runner]
K --> R[ServiceAccount + RBAC]
R --> CL[(Kubernetes API)]
C --> D[(Postgres)]
The agent uses @kubernetes/client-node and in-cluster ServiceAccount
credentials; application code does not shell out to kubectl. The manifest
layer keeps the application, database, RBAC, and schema job explicit so the
deployment boundary is visible and reviewable.
Agent runs speak AG-UI 1.0 end to end: the browser
sends a RunAgentInput and the runner streams server-sent events
(RUN_STARTED, STEP_STARTED/STEP_FINISHED per graph node,
TEXT_MESSAGE_*, TOOL_CALL_*, STATE_SNAPSHOT, RUN_FINISHED). The final
snapshot carries the tool logs, the minted approval request (if a proposal
tool fired), the ordered workflow steps, and the id the assistant message is
persisted with, so live and reloaded views render the same parts. Approvals
stay durable in Postgres; no client-side tool execution or interrupt/resume
loop is involved.
- Web application — Next.js standalone application with chat, teammate management, group conversations, persistence, and health checks.
- Agent runtime — LangGraph state model with LangChain tools and provider adapters.
- Kubernetes boundary — RBAC-scoped ServiceAccount and Kubernetes client calls for cluster inspection and approved actions.
- Persistence — PostgreSQL with Drizzle ORM for teammates, chats, messages, and approval records.
- Release path — Multi-stage Bun image, GHCR publication, Kustomize base and production overlay, plus rollout verification.
KubeMate is built for an internal enterprise deployment model:
- Read-only by default. Inspection tools use
get,list, andwatchpermissions where possible. - Explicit mutation scope. The writer role is limited to the approved Kubernetes actions represented in the application.
- Approval before execution. The chat API persists an action proposal and executes it only after the user approves it.
- No
kubectlin application code. Cluster access uses the Kubernetes API client and ServiceAccount RBAC. - Secrets stay outside Git. AI keys, database credentials, and production kubeconfig are injected through local environment files or Kubernetes/GitHub secrets.
- Container hardening. The application runs as a non-root user with a read-only root filesystem, dropped Linux capabilities, resource limits, and health probes.
KubeMate is currently an internal deployment foundation. It does not add external authentication, billing, hosted task execution, or multi-tenant isolation by default.
- Bun 1.4 or newer
- PostgreSQL 16 or a compatible PostgreSQL instance
- An API key for OpenRouter, Groq, or NVIDIA
bun install
bun run db:push
bun run devOpen http://localhost:3000.
Configure the database and model provider in .env.local:
DATABASE_URL=postgresql://user:password@localhost:5432/kubemate
AI_PROVIDER=openrouter
OPENROUTER__API_KEY=...
OPENROUTER__MODEL=openai/gpt-4o-miniSupported providers are openrouter, groq, and nvidia. Use the matching
*_API_KEY and model variable shown in lib/model.ts.
bun run typecheck
bun run lint
bun run buildKubeMate ships with a repeatable image-to-cluster release path:
- GitHub Actions verifies the application and builds the Docker image.
- The image is published to GHCR with an immutable release tag and short-SHA companion tag.
- The production Kustomize overlay renders the application, PostgreSQL, ServiceAccount, RBAC, Service, and schema job.
- The deploy script creates configuration and secrets, applies the manifests, runs the schema push job, and waits for the rollout.
Review the production deploy script before running it. The script only deploys an image that is already published; it never builds one. From a clone of this repository, set the required values and run:
IMAGE=ghcr.io/akshay2642005/kubemate:0.1.0 \
AI_PROVIDER=openrouter \
AI_MODEL=openai/gpt-4o-mini \
AI_API_KEY=... \
DB_PASSWORD=... \
./scripts/deploy.shIMAGE is optional. When it is unset, the script deploys the reference pinned
in k8s/production/kustomization.yaml, which the release workflow keeps current.
Set ASSUME_YES=yes to skip the context confirmation in non-interactive jobs.
The script reads the production manifests from the checked-out repository, so download the repository or clone it before running the command.
scripts/deploy.sh --dev builds the image with Docker and
deploys that build to a development cluster. It applies the base manifests
from k8s/, optionally loads the image into a local kind or minikube
cluster, and prompts for the model provider, the API key, and the Postgres
password, so no secrets are written to the repository:
./scripts/deploy.sh --devThe script prompts for the Kubernetes context, the model provider, the API key, and the Postgres password, so no secrets are written to the repository.
Pushing a semantic version tag such as 0.1.0 publishes
ghcr.io/akshay2642005/kubemate:0.1.0 and its short-SHA companion tag. The
workflow then updates k8s/production/kustomization.yaml and commits the
release image reference to master. CI does not deploy to a cluster.
| Secret | Purpose |
|---|---|
AI_PROVIDER |
openrouter, groq, or nvidia |
AI_MODEL |
Provider-specific model name |
AI_API_KEY |
Model provider credential for manual deployment |
DB_PASSWORD |
PostgreSQL application password for manual deployment |
The workflow is defined in .github/workflows/ci.yml.
The production overlay is k8s/production, built on the
shared k8s/base resources. The local build flow is available
through ./scripts/deploy.sh --dev.
.
├── app/ Next.js routes, chat API, approval API, health check
├── actions/ Server actions for teammates and group chats
├── components/ Chat UI, teammate UI, and shared primitives
├── db/ Drizzle schema and database client
├── lib/agent/ LangGraph runtime and Kubernetes tools
├── lib/teammate-profiles.ts Built-in specialist teammate profiles
├── k8s/base/ Shared namespace, Postgres, RBAC, app, and job
├── k8s/production/ Production image overlay
├── scripts/ Local/test and production deployment workflows
├── Dockerfile Multi-stage Bun/Next.js production image
└── .github/workflows/ CI, GHCR publication, and optional CD
- Add richer rollout and incident timelines.
- Expand approval-gated actions with policy-aware guardrails.
- Add SSO and organization boundaries for broader enterprise adoption.
- Add audit export and operational analytics.
- Add platform-specific adapters for managed Kubernetes services.
KubeMate is licensed under the MIT License.