Skip to content

Local Dashboard

A Go + React application that provides a local-first dashboard for Kubernetes cost and utilization. It polls one or more ClusterCost agents and serves both JSON APIs and an embedded SPA.

View on GitHub

Point the dashboard at one or more ClusterCost agents. It continuously polls, caches, and exposes normalized cost/efficiency data, providing a UI to visualize clusters, namespaces, nodes, and waste hotspots.

  • Core: cmd/dashboard/main.go boots a chi HTTP server, loads config, and starts a ticker to poll agents.
  • Agents: internal/agents wraps REST calls to agents, handling JSON decoding and errors.
  • Store: internal/store caches data in-memory, aggregates metrics (cost, efficiency), and derives insights.
  • API: internal/api exposes read-only endpoints and serves static assets.
  • Frontend: A React + Vite + Tailwind + shadcn app in web/, compiled and embedded into the Go binary.
  • Config: Configurable via YAML or environment variables (e.g., AGENT_URLS, POLL_INTERVAL).
Terminal window
docker run --rm -p 4173:4173 \
-e CLUSTERCOST_AGENT_URL="grpc://agent.clustercost.svc.cluster.local:9000" \
ghcr.io/clustercost/dashboard:latest

Alternative options:

  • Kubernetes: deploy as a Deployment/Service inside your cluster for shared access.
  • ECS: run as a Fargate service and expose via an internal ALB.
  • Binary: download the static build from the releases page when you need zero-container setups.

Set one or more CLUSTERCOST_AGENT_URL values (comma-separated). The dashboard multiplexes across all configured agents and deduplicates workloads using namespaces, workloads, and tenant labels. Authentication is handled via mTLS when enabled in the agent chart; otherwise the connection remains inside your network boundary.