a0bf943601bdd349449066d58f861c415544ce08
Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
Kubectl Web GUI
A local web-based GUI for kubectl.
Overview
This app provides a lightweight local interface to manage Kubernetes clusters via kubectl.
Features
- Choose Kubernetes context and namespace
- Search resources: pods, nodes, PVCs, and others
- Perform actions: describe, delete, view logs, and more
Tech Stack
- Backend: Python
- Frontend: Lightweight JavaScript
Plan by Phases
Phase 1: Prototype
- Basic Python backend with kubectl wrapper
- Lightweight frontend with context/namespace selectors
- List pods and nodes
- Basic describe and delete actions
Phase 2: Search & Actions
- Search/filter pods, nodes, PVCs, and other resources
- Add logs viewer
- Expand actions: describe, delete, logs, and more
- Improve error handling and feedback
- Session persistence for context/namespace defaults
Phase 3: UI Polish & Documentation
- Better UI/UX and responsive layout
- Documentation and setup instructions
- Confirmation dialogs for destructive actions
Phase 4: Error Handling & Advanced Features
- Improved error handling and feedback
- Possible features:
- Authentication / access controls
- Real-time updates / watch mode
- Multi-cluster dashboard
- Advanced filtering and sorting
- Export reports (JSON/CSV)
- Resource metrics / status indicators
- Custom kubectl plugin integration
Roadmap / Checklist
- Add readme describing kubectl gui plan
- Phase 1: Prototype backend and basic frontend
- Phase 1: Context and namespace selection
- Phase 1: List pods and nodes
- Phase 2: Search pods, nodes, PVCs, and others
- Phase 2: Describe, delete, and logs actions
- Phase 2: Session persistence for context/namespace
- Phase 3: UI polish and documentation
- Phase 4: Error handling and advanced features
Suggestions
- Use a lightweight Python framework (e.g., Flask or FastAPI) for the backend
- Keep frontend vanilla JS or minimal framework to stay lightweight
- Consider running kubectl via subprocess with proper input validation
- Add a simple status indicator for kubectl connectivity
Running Locally
To test the app locally:
-
Start the backend:
cd backend pip install -r requirements.txt uvicorn main:app --reload --host 0.0.0.0 --port 8000 -
Serve the frontend (from the repo root or frontend folder):
cd frontend python -m http.server 8080 -
Open
http://localhost:8080in your browser. The frontend connects tohttp://localhost:8000(CORS is enabled in the backend).
Make sure kubectl is installed and configured with access to your cluster.
Languages
JavaScript
45.2%
Python
35.8%
HTML
9.7%
CSS
9.3%