Get label costs
get_label_costsAggregate Kubernetes costs by any pod label to enable chargeback. Group spend by team, environment, or app, with untagged costs flagged.
Instructions
Aggregate Kubernetes costs by any pod label across all namespaces. Great for chargeback: see spend by team, environment, app, or any label.
Workloads without the label are grouped under 'untagged'. If tagging coverage is low, the response includes a warning with the tagged %.
Common label_key values: team, env, environment, app, component, tier, app.kubernetes.io/name, app.kubernetes.io/part-of
Examples: - "Show me Kubernetes costs by team" - "Which team is spending the most on Kubernetes?" - "Break down K8s costs by environment" - "How much is the payments team spending in the cluster?" - "Show K8s cost by app label" - "What percentage of our cluster is untagged?" Args: label_key: Kubernetes label key to group costs by (e.g. "app", "team"). context: Kubernetes context name from list_kubernetes_contexts(). Default context when omitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| context | No | ||
| label_key | No | team |