Files
kubectl-gui/README.md
T
Jiří Stachandaider 82ee3aa6c2 feat: add phase 2 endpoints, session persistence and actions
Co-authored-by: aider (openrouter/thinkingmachines/inkling-small:free) <aider@aider.chat>
2026-10-09 15:42:31 +02:00

76 lines
2.3 KiB
Markdown

# 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: Polish & Safety
- Confirmation dialogs for destructive actions
- Better UI/UX and responsive layout
- Optional authentication or access controls
- Documentation and setup instructions
## Roadmap / Checklist
- [x] Add readme describing kubectl gui plan
- [x] Phase 1: Prototype backend and basic frontend
- [x] Phase 1: Context and namespace selection
- [x] Phase 1: List pods and nodes
- [x] Phase 2: Search pods, nodes, PVCs, and others
- [x] Phase 2: Describe, delete, and logs actions
- [x] Phase 2: Session persistence for context/namespace
- [ ] Phase 3: Safety confirmations and error handling
- [ ] Phase 3: UI polish and documentation
## 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:
1. Start the backend:
```bash
cd backend
pip install -r requirements.txt
uvicorn main:app --reload --host 0.0.0.0 --port 8000
```
2. Serve the frontend (from the repo root or frontend folder):
```bash
cd frontend
python -m http.server 8080
```
3. Open `http://localhost:8080` in your browser. The frontend connects to `http://localhost:8000` (CORS is enabled in the backend).
Make sure `kubectl` is installed and configured with access to your cluster.