Kubeadapt MCP
Team chargeback and showback
Ask an AI tool connected to Kubeadapt MCP what each team or department cost, what is still unassigned, and what a Kubernetes label costs.
Last updated
Ask your AI tool what each team cost and it answers with every team and department ranked by spend for the month, the share no team owns yet, and the workloads behind it. It reads Kubeadapt Cost Attribution, so teams and departments are the ones you set up in Kubeadapt.
This example needs a connection with the Costs and carbon data kind.
Ask
What did each team cost last month, and what share of the bill is still unassigned?Give me the platform team's month so far: its top workloads, spend by namespace and cluster, and its projected month-end.Which workloads have no team yet? Start with the most expensive.What does the cost-center=analytics label cost us over the last 30 days?Compare spend for each value of the team label over the last 30 days.Draft a chargeback table for September by department, with each department's teams underneath.What happens
| Tool | What it returns here |
|---|---|
get_team_costs | Without ids: the month's cost, run rate, attributed and unattributed spend, and every team and department ranked by cost. With team_id or department_id: that team's or department's detail. With unassigned: the workloads no team owns, most expensive first. |
search | Team and department ids from a name, such as "platform". |
list_cost_labels | The Kubernetes label keys on your workloads, most common first, or one key's values. |
query_costs | Spend filtered by one label value, or by team or department names, grouped by namespace or workload. |
fetch | One workload from the unassigned list, with its cost and resources. |
What the answer contains
- Organization view.
month_cost_usd,run_rate_usd_per_month,attributed_usd,unattributed_usdandunattributed_pct, the change on the previous period, and a row per team and department with its month cost, run rate, change, workload count and potential monthly savings. - Team or department detail. The month cost, run rate,
projected_month_end_usd, share of the organization, top workloads, and spend by namespace and by cluster. A department lists its teams. - Unassigned workloads. Each workload's name, kind, namespace, cluster and
run_rate_usd_per_month: its current CPU, memory and GPU cost per hour × 730. That is what a month costs at today's rate, not what it has spent, and it leaves out idle capacity, storage and network. So these workloads don't add up to the Unassigned figure in the team summary, which is month-to-date spend no team owns. - Counting rules. If some workloads count for more than one team, team costs add up to more than the organization total, and a note gives the difference. If you can't see every cluster, a note says the figures cover only the clusters you can see.
- Provenance. The month and the window in UTC calendar days, the cost mode, and whether the month is still in progress.
Cost mode. Team costs use fully loaded cost unless you ask for workload-only. Fully loaded cost gives each team its share of idle capacity, which is usually what a chargeback needs; workload-only cost is what the team's workloads use or request on their own. See Cost modes.
Follow-ups
Show the same team table in workload-only cost.Which of the platform team's workloads have rightsizing recommendations, and what would they save?How did each department change compared with the period before?Open the unassigned workloads in Kubeadapt so I can assign them.Limits
- Read-only. The AI tool can't assign workloads, create teams or change departments. Assign workloads in Kubeadapt; see Trace cost to a team.
- One calendar month per question.
get_team_coststakes a month asYYYY-MMand defaults to the current month to date. For other ranges, the AI tool usesquery_costswith team or department names. - Unassigned means today. The unassigned list shows the workloads without a team now, at today's rates, so it isn't available for past months.
- Labels filter, they don't group. Costs can be filtered by one label value at a time. To compare a label's values, the AI tool asks once per value, so a label with many values takes many calls.
- Exact names. Team, department and namespace filters match exact names. The AI tool uses
searchfirst when you give part of a name. - Up to 100 teams or workloads per answer, 25 by default.