KubeBolt / docs
GitHub

Architecture

Go backend with informer caches, embedded VictoriaMetrics for history, and an outbound-only agent. 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
24-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)
30+ 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:

The two halves

Backend (per install): reads the Kubernetes API through shared informers, evaluates insights, serves the REST/WebSocket API, and stores historical metrics in an embedded VictoriaMetrics. Auth and users persist in BoltDB.

Agent (per cluster, optional): connects outbound over gRPC (AgentChannel) and ships metric samples — from its built-in kubelet/node collectors, a bundled vmagent scrape sidecar, or by reading your existing Prometheus (promRead). It also carries Hubble network flows for the Reliability tab and tunnels remote exec / port-forward / file browser sessions. See Connecting Clusters.

Key Backend Packages

PackagePurpose
cluster/manager.goCluster registry + lifecycle: kubeconfig contexts, agent-proxy and metrics-only clusters, display names, context switching
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
agent/channelgRPC AgentChannel: sample ingest, tunnels for exec/port-forward/files
metrics/collector.goMetrics Server polling, per-namespace fallback, graceful degradation
insights/engine.go24-rule evaluation engine
copilot/Kobi: 26 tools, providers, conversations, memory/compact, usage analytics
auth/service.goUser management, JWT issue/verify, role enforcement, BoltDB persistence
websocket/hub.goBroadcast hub, 4096 buffer, silent drops when no clients
api/router.goChi router with requireConnector middleware

Data Flow

Deployment topology

The web UI can be served from a different origin than the API (split UI/API), and the chart supports fronting the API with either a classic Ingress or Gateway API (gatewayAPI.enabled) — with separate listeners for the HTTP/WebSocket API and the agent’s gRPC channel.