Skip to content
Docs · Documentation

AI and insights

Cost monitoring

Cluster and namespace costs, idle spend and efficiency from OpenCost.

The Cost view reads OpenCost's allocation API through the Kubernetes API server's service proxy, so no port-forward or ingress is needed. Open it with Cost: Open Cost View. OpenCost must be installed in the cluster and needs Prometheus.

What you see

  • Tiles: total cost, idle cost, and CPU and memory efficiency. Efficiency is usage over request, weighted by cost. It can exceed 100 % when pods use more than they request.
  • Chart: stacked cost over time for the six most expensive namespaces, the rest as one "other" series, and idle. A namespace keeps its color across Kubyl's charts.
  • Table: one row per namespace with CPU, memory, storage, network, total and efficiency. Idle cost and unmounted volumes get their own labelled rows.
  • CSV export with Cost: Export CSV.
ControlDoes
24h / 7d / 30dThe time window.
Include idle (I, Cost: Include Idle)Adds the idle allocation to the totals and chart.
Refresh (R, Cost: Refresh)Reads again now. Otherwise Kubyl refreshes once a minute while a Cost view is open, and does nothing for clusters you are not looking at.

Window and idle choice are remembered per cluster.

How Kubyl finds OpenCost

Kubyl looks for OpenCost's Service by label, then by the name opencost. For installs it does not find, give the address as namespace/service:port (the port defaults to 9003) in settings.json:

settings.json
{
  "cost": {
    "clusters": {
      "<cluster>": { "service": "opencost/opencost:9003" }
    }
  }
}

Empty states

  • Looking: Kubyl is searching for OpenCost.
  • Not installed: says OpenCost needs Prometheus, shows the install command and the settings override above.
  • Services cannot be listed: the message names the missing permission.
  • Unreachable Service: names the verb and port the service proxy needs. If numbers are already on screen, they stay with a warning banner.

Something missing or wrong? Open an issue on GitHub.