DeathStarOps is a real-time Kubernetes cluster monitoring dashboard with an AI-powered chatbot assistant that helps DevOps engineers manage, debug, and understand their cluster health without leaving the UI.
Kubernetes debugging is complex - engineers constantly switch between kubectl commands, logs, dashboards, and documentation. Getting a quick answer like "why is this pod failing?" requires multiple steps and tribal knowledge.
An intelligent assistant that:
- Queries cluster data in natural language - "How are my pods doing?" β fetches real cluster stats
- Provides contextual help - understands current time and page for relevant responses
- Generates kubectl commands - suggests exact commands for operations
- Analyzes pod issues - identifies CrashLoopBackOff, resource limits, etc.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FRONTEND β
β React + TypeScript + Vite + TailwindCSS + shadcn/ui β
β β
β βββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ β
β β Dashboard UI β β AI Chatbot (Tambo) β β
β β - Fleet Status β β - useTamboThread β β
β β - Pod Cards β β - useTamboThreadInput β β
β β - Namespace β β - TamboProvider with Tools β β
β βββββββββββββββββββ ββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β /api proxy
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β BACKEND β
β Node.js + Express + kubectl β
β β
β /api/cluster-stats β kubectl get nodes, pods β
β /api/pods β kubectl get pods -A -o json β
β /api/pods/:ns/:name β kubectl describe pod + logs β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β KUBERNETES CLUSTER β
β (Minikube) β
β β
β ArgoCD, Kyverno, Redis, and application workloads β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Layer | Technologies |
|---|---|
| Frontend | React 18, TypeScript, Vite, TailwindCSS, shadcn/ui, Zustand |
| AI Integration | @tambo-ai/react, @tambo-ai/typescript-sdk |
| Backend | Node.js, Express, child_process (kubectl) |
| Infra | Kubernetes (Minikube), ArgoCD, Kyverno |
Wrapped the app with TamboProvider to enable AI capabilities throughout:
// tambo-wrapper.tsx
<TamboProvider
apiKey={tamboKey}
components={tamboComponents}
tools={tamboTools}
contextHelpers={{
userTime: currentTimeContextHelper,
userPage: currentPageContextHelper,
}}
>
{children}
</TamboProvider>Created 5 tools that Tambo's AI can execute:
| Tool | Purpose |
|---|---|
getClusterStats |
Fetch node/pod counts, capacity, health |
getPodInfo |
Get details about a specific pod |
listPods |
List/filter pods by namespace or status |
getNamespaces |
List all cluster namespaces |
suggestKubectlCommand |
Generate kubectl commands |
// Example tool definition
const getClusterStatsTool: TamboTool = {
name: 'getClusterStats',
description: 'Fetches cluster health statistics...',
tool: async () => {
const response = await fetch('/api/cluster-stats');
const stats = await response.json();
return { nodes: stats.nodes, runningPods: stats.pods.running, ... };
},
inputSchema: z.object({}),
outputSchema: z.object({ ... }),
};Added context helpers so the AI knows the current time and page:
const currentTimeContextHelper = () => new Date().toLocaleString();
const currentPageContextHelper = () => window.location.pathname;Used Tambo's React hooks for the chat UI:
const { thread } = useTamboThread();
const { value, setValue, submit, isPending, isError, error } = useTamboThreadInput();Added proper error display when API calls fail:
{isError && error && (
<div className="error-box">
<AlertTriangle /> Error: {error.message}
</div>
)}- π Real-time Pod Monitoring - View all pods with live status updates
- π€ AI-Powered Analysis - Get intelligent error analysis and configuration explanations
- π¨ Light/Dark Themes - Stormtrooper White & Star Destroyer Bridge modes
- π Cluster Health Overview - See node count, capacity, and alerts at a glance
- π·οΈ Smart Pod Grouping - Pods organized by category (Applications, System, Monitoring, etc.)
- β‘ Pod Actions - Restart, delete, and scale pods directly from the UI
Before you begin, ensure you have:
- Node.js (v18 or higher) - Download
- npm (comes with Node.js)
- kubectl configured with cluster access - Install kubectl
- Tambo AI API Key - Get your key
# Check Node.js version
node --version
# Should show v18.x.x or higher
# Check npm
npm --version
# Check kubectl is configured
kubectl cluster-info
# Should show cluster info if connectedgit clone https://github.com/ayushsgit/DeathStarOps.git
cd DeathStarOps# Install server dependencies
cd server
npm install
# Install client dependencies
cd ../client
npm installCreate a .env file in the server directory:
cd server
touch .envAdd your Tambo AI API key:
TAMBO_API_KEY=your_tambo_api_key_hereYou need two terminal windows - one for the server and one for the client.
Terminal 1 - Start the Backend Server:
cd server
npm run devThe server will start on http://localhost:3001
Terminal 2 - Start the Frontend:
cd client
npm run devThe client will start on http://localhost:5173
Open your browser and go to: http://localhost:5173
You'll be prompted to enter your Tambo AI API key on first load.
Opus-DeathStarOps/
βββ client/ # React Frontend
β βββ src/
β β βββ components/ # React components
β β βββ lib/ # Utilities & API client
β β βββ store/ # Zustand state stores
β β βββ App.tsx # Main application
β βββ package.json
β βββ vite.config.ts # Vite configuration
β
βββ server/ # Node.js Backend
β βββ server.js # Express server
β βββ package.json
β
βββ README.md # This file
cd client
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Type check
npm run typecheckcd server
# Start development server (with hot reload)
npm run dev
# Start production server
npm startcd client
npm run buildThis creates a dist/ folder with the production-ready frontend.
For production, you can serve the built client through the Express server or use a static file server like nginx.
- Ensure
kubectlis properly configured - Run
kubectl cluster-infoto verify connection - Check if your kubeconfig is set:
echo $KUBECONFIG
- Make sure you've entered a valid Tambo AI API key
- Clear browser localStorage and re-enter the API key
- Kill the process using the port:
# For port 3001 (server) lsof -ti:3001 | xargs kill -9 # For port 5173 (client) lsof -ti:5173 | xargs kill -9
- Delete
node_modulesand reinstall:rm -rf node_modules package-lock.json npm install
- Context provider crashes - Tambo hooks crash when called outside
TamboProvider. Fixed by handling the "skip auth" flow gracefully. - API endpoint mismatch - Tools were calling wrong endpoints. Fixed by aligning frontend tools with backend routes.
- Proxy configuration - Vite wasn't forwarding API calls to the backend. Added proxy config.
- Tambo's tool system is powerful - The AI automatically decides when to call tools based on user intent.
- Error handling is critical - Always handle errors gracefully in both hooks and tool execution.
- Context helpers add value - Small additions like time/page context make the AI more helpful.
- Add
useTamboSuggestionsfor quick action buttons - Add
useTamboStreamStatusfor better loading indicators - Add voice input with
useTamboVoice
Google Gemini, Claude Opus were used for boilerplate template and fixing backend refreshing bugs.
MIT License - Feel free to use this for your own projects!
May the Force be with your clusters. π