Skip to main content

Configuration

KubeVision is configured via a YAML file or environment variables.

Configuration File

server:
port: 8080

database:
driver: sqlite # sqlite | postgres
dsn: kubevision.db # file path or connection string

auth:
jwt_secret: "" # auto-generated if empty
access_token_ttl: 15m
refresh_token_ttl: 168h # 7 days

kubernetes:
kubeconfig: "" # empty = in-cluster mode
informer_resync: 30m

Environment Variables

All settings can be overridden via environment variables:

VariableDescriptionDefault
KUBEVISION_SERVER_PORTHTTP port8080
KUBEVISION_DB_DRIVERDatabase driver (sqlite or postgres)sqlite
KUBEVISION_DB_DSNDatabase connection stringkubevision.db
KUBEVISION_JWT_SECRETJWT signing secretauto-generated
KUBEVISION_ACCESS_TOKEN_TTLAccess token lifetime15m
KUBEVISION_REFRESH_TOKEN_TTLRefresh token lifetime168h
KUBECONFIGPath to kubeconfig filein-cluster
KUBEVISION_INFORMER_RESYNCInformer resync period30m
KUBEVISION_ALLOWED_ORIGINSWebSocket origin whitelist (comma-separated)*

Database

SQLite (Development)

Default configuration, zero setup:

database:
driver: sqlite
dsn: kubevision.db

PostgreSQL (Production)

database:
driver: postgres
dsn: "host=localhost port=5432 user=kubevision password=secret dbname=kubevision sslmode=disable"

Or via environment variable:

export KUBEVISION_DB_DRIVER=postgres
export KUBEVISION_DB_DSN="host=localhost port=5432 user=kubevision password=secret dbname=kubevision sslmode=disable"

Kubernetes Connection

In-Cluster Mode

When deployed inside a Kubernetes cluster, KubeVision automatically uses the service account token. No configuration needed.

External Mode

Point to your kubeconfig:

export KUBECONFIG=/path/to/kubeconfig

Or in the config file:

kubernetes:
kubeconfig: /path/to/kubeconfig

Informer Cache

KubeVision uses Kubernetes Informers to cache frequently accessed resources for sub-millisecond reads:

Cached resources (8): Pods, Deployments, StatefulSets, DaemonSets, Services, Ingresses, Nodes, Namespaces

On-demand resources (18+): Jobs, CronJobs, ConfigMaps, PVs, PVCs, etc.

Never cached: Secrets (security), Events (volume)

The informer_resync setting controls how often the cache is fully re-synced with the API Server.