InfrastructureHealer is an incident-response training simulator that teaches practical Kubernetes debugging through guided chaos scenarios.
Learners investigate real failure patterns in a sandbox cluster while an AI mentor (Gemma 4) provides progressive hints instead of instant answers.
Many learners can run commands but struggle with operational reasoning under pressure.
InfrastructureHealer trains a repeatable debugging method:
- Observe system state
- Form a hypothesis
- Test with terminal evidence
- Verify service recovery
This focuses on practical digital reliability skills for students, junior DevOps engineers, and bootcamp cohorts.
InfrastructureHealer improves infrastructure learning outcomes by turning abstract Kubernetes concepts into realistic incident drills.
Learners practice diagnosing failures from live evidence, applying remediation safely, and validating recovery in a guided loop.
Target outcomes:
- Faster incident triage confidence for early-career engineers
- Better root-cause identification through evidence-based debugging
- Stronger operational readiness for education and workforce training programs
- Mentor engine runs via Ollama using
gemma4:e2b(engine.py). - The model drives scenario coaching, contextual guidance from terminal history, and victory-review explanations.
- Prompting enforces methodology-first hints with escalating guidance rather than immediate command reveal.
- 6 guided infrastructure incidents (from beginner to expert)
- Real terminal command execution with safety guardrails (
kubectlonly) - Live pod dashboard and scenario state tracking
- Progressive level unlocks and star-based scoring
- AI mentor chat integrated with cluster context and terminal activity
- Hello, Cluster - environment discovery basics
- Silent Crash - restart loop and log-driven diagnosis
- OOM - memory limits and runtime stabilization
- Poisoned Update - rollout rollback and recovery
- Zombie Apocalypse - OS-level process failure containment
- Connection Leak - socket exhaustion investigation
- Backend: FastAPI (
main.py), scenario engine (chaos_injector.py), mentor engine (engine.py) - Frontend: React + TypeScript + Vite (
frontend/) - Model Runtime: Ollama local API (
http://localhost:11434/api/chat) - Sandbox Infra: Kubernetes (local k3d cluster recommended)
- Users can switch mentor models from the Model Settings modal in the frontend.
- The backend persists model choice in
model_settings.json. - Each preset includes approximate hardware guidance to help users choose a model that matches their machine.
- Advanced users can enable a custom model id option in the modal.
- The app checks Ollama runtime status and shows whether the selected model is installed.
- If a model is missing, the UI shows the exact pull command to run.
- Python 3.10+
- Node.js 20+
- Docker
kubectlk3d(recommended for local sandbox)- Ollama with Gemma 4 model
python sandbox.py createFrom project root:
pip install fastapi uvicorn requests pydantic docker
uvicorn main:app --reloadBackend runs on http://127.0.0.1:8000.
cd frontend
npm install
npm run devFrontend runs on http://localhost:5173.
ollama pull gemma4:e2b
ollama pull gemma4:e4bEnsure Ollama is running before opening mentor chat.
GET /api/scenarios- scenario metadataGET /api/status- live scenario and pod statusPOST /api/chaos/inject- start selected scenarioPOST /api/chaos/cleanup- end/reset current scenarioGET /api/settings- current model settings and available model optionsPOST /api/settings/model- update selected modelGET /api/settings/ollama- Ollama health check + installed model listPOST /api/chat- mentor response generationPOST /api/command/execute- safe terminal execution
- Terminal endpoint blocks non-
kubectlcommands and shell chaining symbols. - This is a training simulator, not a production incident automation tool.
- Designed for local, sandboxed use.
- Scenario verification rules are heuristic and can be expanded.
- Model quality depends on local hardware and Ollama runtime responsiveness.
- Current default is
gemma4:e2b, which is lightweight and responsive for local coaching loops. - Smaller models can be less consistent at multi-step mentoring (for example: weaker hypothesis tracking across long chats).
- A larger Gemma 4 variant (such as a 4B-class model, if available in your runtime) can improve coaching depth, hint quality, and reasoning stability.
- Larger models usually require more VRAM/RAM and may increase latency, so the best choice depends on your hardware and classroom/demo constraints.
- Fast (lower-resource laptops):
gemma4:e2b
Best for smooth UX and quick hint turnaround when hardware is limited. - Balanced (most demos): nearest available mid-size Gemma 4 variant in your Ollama setup
Better reasoning consistency while keeping latency acceptable for live mentoring. - Quality (strong hardware): largest stable Gemma 4 variant your machine can run
Best for deeper coaching and more reliable multi-turn methodology guidance.
Tip: keep one fallback profile ready (Fast) before live judging sessions in case of resource pressure.
- Chat returns Ollama 404/500: open Model Settings and use Refresh Check.
- Selected model not installed: run
ollama pull <model-id>(same command is shown in UI). - Ollama not reachable: ensure Ollama is running on
localhost:11434. - Changed code but old behavior persists: restart backend with
uvicorn main:app --reload.
Prototype project for educational and hackathon use.