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, configmaps, and others
  • Perform actions: describe, delete, view logs, exec (non-interactive), 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: More Resources & Actions

  • Add configmaps and additional resource types
  • Non-interactive exec into pods (with container selection)
  • Additional kubectl actions and endpoints

Phase 4: UI Polish & Documentation

  • Better UI/UX and responsive layout
  • Documentation and setup instructions
  • Confirmation dialogs for destructive actions

Phase 5: 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: More resources (configmaps) and non-interactive exec
  • Phase 4: UI polish and documentation
  • Phase 5: 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:

  1. Start the backend:

    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):

    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.

S
Description
Web gui for kubectl.
Readme MIT
77 KiB
0 Stars 1 Watchers 0 Forks
Languages
JavaScript 45.2%
Python 35.8%
HTML 9.7%
CSS 9.3%