Skip to main content

Documentation Index

Fetch the complete documentation index at: https://radarhq.io/docs/llms.txt

Use this file to discover all available pages before exploring further.

This document covers Radar’s cluster connection behavior. For CLI flags and basic usage, see the README.

Persistent Configuration

Radar stores configuration in two files under ~/.radar/:

Config File (~/.radar/config.json)

Persistent defaults for CLI flags. CLI flags always override these values. Managed via the Settings dialog in the UI or PUT /api/config.
{
  "kubeconfig": "",
  "kubeconfigDirs": [],
  "namespace": "",
  "port": 9280,
  "noBrowser": false,
  "timelineStorage": "memory",
  "timelineDbPath": "~/.radar/timeline.db",
  "historyLimit": 10000,
  "prometheusUrl": "",
  "mcp": true
}
All fields are optional - omitted fields use built-in defaults.
FieldDescription
kubeconfigPath to kubeconfig file (same as --kubeconfig)
kubeconfigDirsDirectories containing kubeconfig files (same as --kubeconfig-dir)
namespaceInitial namespace filter
portServer port (default 9280)
noBrowserDon’t auto-open browser
timelineStoragememory or sqlite
timelineDbPathPath to SQLite database
historyLimitMax timeline events to retain
prometheusUrlManual Prometheus/VictoriaMetrics URL - skips auto-discovery. Useful when Prometheus is not in the same cluster or uses a non-standard service name.
mcpEnable/disable MCP server for AI tools (default: enabled)

Settings File (~/.radar/settings.json)

User preferences for the UI. Managed via the Settings dialog or PUT /api/settings.
{
  "theme": "system",
  "pinnedKinds": [
    { "name": "Deployments", "kind": "Deployment", "group": "" }
  ]
}
FieldValuesDescription
themelight, dark, systemUI theme preference
pinnedKindsArray of {name, kind, group}Resource kinds pinned to the sidebar

Cluster Connection Precedence

Radar connects to Kubernetes clusters using the same configuration sources as kubectl:
PrioritySourceDescription
1--kubeconfig flagExplicit path to kubeconfig file
2KUBECONFIG env var / --kubeconfig-dir flagEither can provide kubeconfig(s); mutually exclusive alternatives
3In-cluster configAutomatic when running inside a Kubernetes pod (KUBERNETES_SERVICE_HOST is set)
4~/.kube/configDefault kubeconfig location

KUBECONFIG vs In-Cluster Detection

When Radar runs inside a Kubernetes pod, Kubernetes automatically sets the KUBERNETES_SERVICE_HOST environment variable. This normally triggers in-cluster configuration using the pod’s service account credentials. However, explicit kubeconfig takes precedence. If you set KUBECONFIG or pass --kubeconfig, Radar uses that instead of in-cluster config. This allows you to:
  • Run Radar inside a pod but connect to a different cluster
  • Use specific credentials instead of the pod’s service account
  • Test with a custom kubeconfig while developing inside a cluster
Example: Override in-cluster config
# Inside a pod, connect to a different cluster
export KUBECONFIG=/path/to/other-cluster.yaml
kubectl radar
This behavior matches kubectl and follows the Kubernetes client-go precedence rules.

Multiple Kubeconfig Files

KUBECONFIG can contain multiple file paths (colon-separated on Linux/macOS, semicolon-separated on Windows). Radar merges these files following Kubernetes conventions:
export KUBECONFIG=~/.kube/config:~/.kube/staging-config:~/.kube/prod-config
kubectl radar
Alternatively, use --kubeconfig-dir to load all kubeconfig files from a directory:
kubectl radar --kubeconfig-dir ~/.kube/configs/

Context Switching

Radar supports switching between Kubernetes contexts at runtime through the UI. Click the context selector in the header to switch between available contexts. When running in-cluster (using the pod’s service account), context switching is disabled.