Repository navigation
Cost
What your cluster costs — per namespace, workload, Pod, node or label value, over the last 24 hours, 7 days or 30 days, split into CPU, memory, storage, network, GPU and other — as OpenCost or Kubecost running in the cluster computes it. A workload's details add a monthly estimate and what its right-sizing recommendation would save.
Sextant only reads costs. It does not install OpenCost or Kubecost and changes nothing in the cluster.
Contents: What you need · The Cost page · In a workload's details · How Sextant reaches the cost service · Limits · Troubleshooting
-
OpenCost (https://www.opencost.io) or Kubecost in the cluster. Sextant looks for its Service in the
opencostandkubecostnamespaces, and in any namespace by the labelapp.kubernetes.io/name: opencostorcost-analyzer. If both are there, OpenCost is used. The page names the Service it uses. - Permission to
getservices/proxyon that Service (Sextant talks to it through the Kubernetes API server, with your own credentials).
Without either product the page says OpenCost or Kubecost was not found, and the workload section is not shown.
Open Cluster → Cost.
- Choose the Period: Last 24 hours, Last 7 days or Last 30 days.
- Choose Group by: Namespace, Workload, Pod, Node or Label (enter a label key such as
app.kubernetes.io/nameand choose Show). - The namespace filter at the top limits the rows to the namespaces you chose.
The page shows:
- Totals: the total, the allocated part and the idle cost — node capacity no workload used. Idle belongs to the whole cluster, so it is the same when namespaces are filtered.
- Split of the allocated cost by CPU, memory, storage, network (and GPU and other when there are any).
- A table, most expensive first: each group's cost per resource, its total and its efficiency (usage divided by requests). Choose a row to open its namespace, workload, Pod or node. Special rows are named in words: Without a namespace, Without a controller, Volumes no Pod mounts, and so on.
Amounts are in the currency the answer names; if it names none, they are in the currency OpenCost or Kubecost is configured with. The page refreshes every 10 minutes while it is open (OpenCost itself recomputes every few minutes).
Deployments, Stateful Sets and Daemon Sets get a Cost section (after Right-sizing):
- Cost over the last 7 days.
- Monthly estimate: the cost of the last 7 days — or of the time the workload ran in them — scaled to 30 days.
- Unit prices this workload's own costs imply: per CPU core-hour and per GiB-hour of memory.
- Estimated savings with the right-sizing recommendation: the requests above the recommendation, over all replicas, times those unit prices, over 30 days. If the recommendation does not lower the requests, it saves nothing; if a lowered resource has no price, no estimate is shown. Open right-sizing takes you to the recommendation.
These are estimates: they assume the period's rate goes on and that the price of a core or a GiB stays the same when requests go down.
Through the Kubernetes API server's service proxy (/api/v1/namespaces/<namespace>/services/<service>:<port>/proxy/…), the same way it reaches Prometheus: no local port is opened, no port-forward is left behind, and no password or token is asked for or stored. Every request is built by Sextant from the choices on the page — the period, the grouping and the namespaces — never from a text you type; the label key is checked first.
- Each request may take at most 30 seconds (a 30-day period is computed on the spot).
- An answer larger than 8 MiB is refused: choose a coarser grouping or a shorter period.
- At most the 2000 most expensive groups are shown; the page says how many there were.
- At most 200 namespaces of the filter are sent.
| You see | What to do |
|---|---|
| OpenCost or Kubecost was not found | Install one of them, or give its Service the label app.kubernetes.io/name: opencost (or cost-analyzer). |
| No permission … (services/proxy) | Ask for get on services/proxy in the cost service's namespace. |
| The cost service … did not answer through the API server | Check that its pods run and the Service has endpoints. |
| No costs in this period | OpenCost needs some time after installation before it has data. |
AI agents (MCP) and extensions get no cost data.
Sextant is licensed under MIT or Apache-2.0. Found a mistake in this wiki? Open an issue.
Sextant
- Home
- Installation
- Getting started
- Using Sextant
- YAML editor
- Terminal
- Views and workspaces
- Custom columns
- Kubeconfig management
- All clusters
- Set image
- Image files
- Safe apply (Preview changes)
- Upgrade readiness
- Security posture
- Best practices
- Storage
- Right-sizing
- Cost
- Resource map
- Request metrics and traffic
- Change timeline
- Cleanup
- Autoscaling
- Connectivity
- Traffic diagnosis
- Compare and drift
- RBAC: who can do what
- cert-manager and certificates
- Problems and notifications
- Argo Rollouts and Argo Workflows
- Ecosystem views
- Gateway API
- Service mesh
- Installing Flux and Argo CD
- MCP server
- Extensions
- Writing extensions
- Large clusters
- Accessibility
- Settings
- Troubleshooting
For contributors