KubeBolt / docs
GitHub

Architecture

Go backend with in-memory caches and BoltDB for auth. React frontend with live WebSocket updates.

System Diagram

SOURCE Kubernetes Cluster(s)
API Server
Kubernetes core API
Metrics Server
metrics.k8s.io/v1beta1
ENGINE KubeBolt Backend (Go)
Cluster Manager
multi-cluster lifecycle, async connection
Shared Informers
typed resources via client-go
Dynamic Client
Gateway API CRDs (unstructured)
Permission Probe
22 SSAR calls, semaphore of 10
Metrics Collector
30s poll, in-memory cache
Insights Engine
12-rule evaluation engine
Auth Service
JWT sessions, BoltDB user store
REST API (Chi v5)
lists, details, YAML, logs
WebSocket Hub
real-time broadcasts
Copilot Proxy
LLM tool-calling bridge
SURFACE KubeBolt Frontend (React 18 · TS · Vite 5 · Tailwind)
23 Resource Views
TanStack Table + Query
Cluster Map
React Flow 11
AI Copilot
multi-provider, 16 tools
Theme System
dark/light via CSS variables

Go Workspace

Monorepo with go.work containing three modules:

Key Backend Packages

PackagePurpose
cluster/manager.goMulti-cluster lifecycle, context switching, async initial connection
cluster/connector.goShared informers + dynamic client, 20s cache sync timeout, 15s rest timeout
cluster/permissions.goRBAC probing via SSAR, cluster-wide then namespace fallback, semaphore of 10
cluster/nslister.goMulti-namespace lister wrappers for namespace-scoped ServiceAccounts
cluster/graph.goIn-memory topology graph with debounced rebuild (2s)
cluster/relationships.goEdge detection: ownerRefs, selectors, Gateway parentRefs, volumes
metrics/collector.goMetrics Server polling, per-namespace fallback, graceful degradation
insights/engine.go12-rule evaluation engine
auth/service.goUser management, JWT issue/verify, role enforcement, BoltDB persistence
auth/middleware.goAuth middleware with httpOnly cookie extraction and role-based route guards
websocket/hub.goBroadcast hub, 4096 buffer, silent drops when no clients
api/router.goChi router with requireConnector middleware
api/handlers.goREST handlers with metrics injection, YAML, logs, deployment history

Data Flow