> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS EKS Cost Allocation

> Compare EKS cost allocation methods for Kubernetes cost visibility, including AWS Split Cost Allocation, AWS-managed usage metrics, and Kubecost or OpenCost.

EKS cost allocation helps you see which pods, namespaces, and teams use shared cluster capacity. This guide compares AWS Split Cost Allocation, AWS-managed usage metrics, and Kubecost or OpenCost so you can choose the right Kubernetes cost visibility method and normalize the result in Costory.

<img src="https://mintcdn.com/costory/glWygnTKl6-bpdwy/images/use-cases/eks-cost-allocation/team-total-cost.png?fit=max&auto=format&n=glWygnTKl6-bpdwy&q=85&s=1f1a6e7d1f7096184cffd9dd53821944" alt="Costory Explorer showing EKS costs grouped by team and application" width="1680" height="915" data-path="images/use-cases/eks-cost-allocation/team-total-cost.png" />

*Use EKS labels to group cluster costs by team, application, or environment in Costory.*

## Prerequisites

* You have an **AWS EKS** cluster running.
* You have an AWS provider connected to Costory with your [<Tooltip tip="AWS's detailed billing export, the raw data source for AWS cost analysis." cta="See Glossary" href="/docs/glossary#cur">CUR</Tooltip> data](/setup/billing#aws) ingested.
* You have labels or tags applied to your pod deployments, or you plan to add them.
* For Kubecost or OpenCost, you can export allocation data to a shared S3 bucket that Costory can access.

## Output

* Granular cost visibility at the Kubernetes label level, including team, app, environment, namespace, and cluster.
* A clear choice between request-based, usage-based, and OpenCost-backed allocation.
* Ability to track <Tooltip tip="Waste expressed as a percentage of total cluster or node pool capacity." cta="See Glossary" href="/docs/glossary#waste-ratio">waste ratio</Tooltip> per node pool and identify over-provisioned clusters.
* Foundation for <Tooltip tip="The process of assigning shared or untagged cloud costs to teams, products, or environments." cta="See Glossary" href="/docs/glossary#cost-allocation">cost allocation</Tooltip> and <Tooltip tip="Billing internal teams for their share of shared cloud costs." cta="See Glossary" href="/docs/glossary#chargeback">chargeback</Tooltip> across teams.
* Stable cost data using [Contracted Cost](/docs/savings-plan-cost-fluctuation), so Savings Plan reassignments between clusters do not create false cost spikes.

## Choose an EKS cost allocation method

Pick the method that matches the allocation signal you trust most: Kubernetes requests, measured CPU and memory usage, or OpenCost allocation data.

| Option                                                                                                                                                                                                                        | How it works                                                                                                                                                                                                                                                                                                                                                                                                                                                | Best for                                                                                                        | Limitations                                                                                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| AWS <Tooltip tip="An AWS feature that breaks down container costs (EKS, ECS) to individual pod labels." cta="See Glossary" href="/docs/glossary#split-cost-allocation">Split Cost Allocation</Tooltip> with Kubernetes labels | AWS adds pod-level cost records to your <Tooltip tip="AWS's detailed billing export, the raw data source for AWS cost analysis." cta="See Glossary" href="/docs/glossary#cur">CUR</Tooltip> based on requested CPU and memory. EKS Kubernetes labels can be activated as <Tooltip tip="Tags that must be activated in billing before they appear in reports." cta="See Glossary" href="/docs/glossary#cost-allocation-tags">Cost Allocation Tags</Tooltip>. | Fast setup when you want agentless EKS cost allocation in billing data.                                         | Costs follow requests, not actual usage. Over-requesting workloads can receive more cost than they consume.          |
| AWS-managed usage metrics                                                                                                                                                                                                     | AWS reads CPU and memory usage metrics from CloudWatch or Amazon Managed Service for Prometheus, then uses those metrics for split cost allocation.                                                                                                                                                                                                                                                                                                         | Teams that want allocation closer to actual CPU and memory consumption while keeping AWS billing as the source. | Requires a metrics collector or agent in the cluster. Direct outbound network costs are not split at workload level. |
| Kubecost or OpenCost                                                                                                                                                                                                          | You install the Kubecost or OpenCost agent on each cluster, then export allocation data to a shared S3 bucket that Costory can access.                                                                                                                                                                                                                                                                                                                      | Clusters where outbound network costs or Kubernetes-native allocation reports are material.                     | Requires agent management, export jobs, and access to a shared storage location.                                     |

<Info>
  If you are starting from scratch, start with AWS <Tooltip tip="An AWS feature that breaks down container costs (EKS, ECS) to individual pod labels." cta="See Glossary" href="/docs/glossary#split-cost-allocation">Split Cost Allocation</Tooltip>. Add usage metrics or OpenCost data only when requests are too coarse or network allocation is material.
</Info>

## Recommended labels for EKS chargeback

Start with a small label set that answers who owns the workload, what it runs, and where it runs. You can add more labels later, but these fields cover most EKS <Tooltip tip="The process of assigning shared or untagged cloud costs to teams, products, or environments." cta="See Glossary" href="/docs/glossary#cost-allocation">cost allocation</Tooltip> workflows.

| Label              | Example values                 | Use it to                                                   |
| ------------------ | ------------------------------ | ----------------------------------------------------------- |
| `team`             | `platform`, `data`, `payments` | Route costs to the right engineering or product team.       |
| `app` or `service` | `api`, `worker`, `checkout`    | Find which service drives spend inside a team.              |
| `env`              | `production`, `staging`, `dev` | Separate production costs from non-production usage.        |
| `cluster`          | `prod-eu`, `shared-us`         | Compare clusters and find placement issues.                 |
| `namespace`        | `payments`, `observability`    | Allocate shared cluster costs when teams map to namespaces. |

Use consistent lowercase values. Avoid aliases like `prod`, `prd`, and `production` unless you plan to normalize them in <Tooltip tip="Costory reporting fields used to filter, group, allocate, scope, alert, and report on costs." cta="See Glossary" href="/docs/glossary#dimensions">Dimensions</Tooltip>.

## Set up your chosen EKS cost allocation method

<Steps>
  <Step title="Configure the allocation data source">
    <Tabs>
      <Tab title="AWS Split Cost Allocation">
        AWS Split Cost Allocation adds pod-level cost records to your <Tooltip tip="AWS's detailed billing export, the raw data source for AWS cost analysis." cta="See Glossary" href="/docs/glossary#cur">CUR</Tooltip>. Kubernetes custom labels for EKS became available as cost allocation tags in October 2025, so you can attribute EKS costs by business labels such as team, application, and environment.

        1. Go to the [AWS Cost and Usage Report settings](https://console.aws.amazon.com/billing/home#/tags).
        2. Follow the [AWS guide for enabling split cost allocation data](https://docs.aws.amazon.com/cur/latest/userguide/enabling-split-cost-allocation-data.html).
        3. Include resource IDs and use hourly reports when you need the most granular data.
        4. Activate the relevant <Tooltip tip="Tags that must be activated in billing before they appear in reports." cta="See Glossary" href="/docs/glossary#cost-allocation-tags">Cost Allocation Tags</Tooltip> in the Billing console.
      </Tab>

      <Tab title="AWS-managed usage metrics">
        AWS can read CPU and memory usage metrics from CloudWatch or Amazon Managed Service for Prometheus. With Amazon Managed Service for Prometheus, AWS expects these metrics:

        * `container_cpu_usage_seconds_total`
        * `container_memory_working_set_bytes`

        Follow the [AWS guide for split cost allocation with Amazon Managed Service for Prometheus](https://docs.aws.amazon.com/cur/latest/userguide/split-cost-allocation-data-resource-amp.html). AWS provides a managed collector option, but the cluster still needs collector access so metrics can flow from EKS to the managed Prometheus workspace.

        <Note>
          If you customize the scrape configuration, keep the `name`, `namespace`, and `pod` labels on the required metrics. AWS uses those labels to match usage metrics back to EKS workloads.
        </Note>
      </Tab>

      <Tab title="Kubecost or OpenCost">
        Use Kubecost or OpenCost when you need to split direct outbound network costs by workload.

        1. Install the Kubecost or OpenCost agent on each EKS cluster.
        2. Configure the agent to collect workload allocation data.
        3. Run a cron job that exports OpenCost data to a shared S3 bucket.
        4. Grant Costory access to that S3 bucket so the exported allocation data can be ingested.
      </Tab>
    </Tabs>
  </Step>

  <Step title="Add labels to pod deployments">
    Add labels that reflect ownership and purpose to each Kubernetes workload:

    ```yaml theme={null}
    metadata:
      labels:
        app: my-service
        team: platform
        env: production
    ```

    Use the same label keys across clusters. If teams already use different names, such as `owner`, `team`, and `cost_center`, keep them for now and merge them later in Costory.
  </Step>

  <Step title="Wait for data to flow into Costory">
    After configuring AWS <Tooltip tip="An AWS feature that breaks down container costs (EKS, ECS) to individual pod labels." cta="See Glossary" href="/docs/glossary#split-cost-allocation">Split Cost Allocation</Tooltip>, **wait 2-3 days** for the data to appear in your Cost and Usage Report and flow into Costory.

    For Kubecost or OpenCost, the delay depends on your export schedule and the Costory ingestion cadence for the shared S3 bucket.
  </Step>

  <Step title="Validate labels in Costory">
    Before you build dashboards or <Tooltip tip="Billing internal teams for their share of shared cloud costs." cta="See Glossary" href="/docs/glossary#chargeback">chargeback</Tooltip> views, check that your labels are present and populated:

    1. Open <Tooltip tip="Costory's main interface for exploring cloud costs across providers." cta="See Glossary" href="/docs/glossary#cost-explorer">Explorer</Tooltip>.
    2. Filter to your AWS account and EKS services.
    3. Group by one label, such as `team` or `app`.
    4. Check the `null` or unallocated bucket.
    5. Fix missing labels at the deployment level, then wait for the next billing export or OpenCost export.

    If labels are present under different names, merge them with <Tooltip tip="Costory reporting fields used to filter, group, allocate, scope, alert, and report on costs." cta="See Glossary" href="/docs/glossary#dimensions">Dimensions</Tooltip>. For example, merge `k8s_label_team`, `team`, and `owner` into one reporting field.
  </Step>
</Steps>

## Analyze EKS costs in Costory

Once EKS labels appear in Costory, use them to find waste, build team reporting, and share cost changes.

<Tip>
  You can investigate EKS spend straight from chat with the [Costory MCP](/features/mcp). Ask "split last month's EKS cost by `team` and show the node pools with the highest waste ratio" and read the answer without opening Explorer.
</Tip>

### Find waste by node pool

Use <Tooltip tip="Costory's main interface for exploring cloud costs across providers." cta="See Glossary" href="/docs/glossary#cost-explorer">Explorer</Tooltip> to group by node pool and spot clusters with unusually high waste.

<img src="https://mintcdn.com/costory/glWygnTKl6-bpdwy/images/use-cases/eks-cost-allocation/waste-ratio.png?fit=max&auto=format&n=glWygnTKl6-bpdwy&q=85&s=348c37660ab5f7a198ef0708d1fcf811" alt="Costory Explorer showing EKS waste ratio by node pool" width="1680" height="726" data-path="images/use-cases/eks-cost-allocation/waste-ratio.png" />

*Explorer can show waste ratio by node pool so you can find over-provisioned cluster capacity.*

See the [Kubernetes waste guide](/use-cases/k8s_waste/visibility) for detailed waste analysis steps.

### Identify over-requesting deployments

For native split allocation, sort by requested CPU or memory to find workloads that reserve more capacity than they use.

<img src="https://mintcdn.com/costory/glWygnTKl6-bpdwy/images/use-cases/eks-cost-allocation/over-requested-deployments.png?fit=max&auto=format&n=glWygnTKl6-bpdwy&q=85&s=a8e43949da2403cd762a2e79e122ff42" alt="Costory Explorer showing EKS deployments with high requested CPU" width="1680" height="732" data-path="images/use-cases/eks-cost-allocation/over-requested-deployments.png" />

*Deployment-level views help you find workloads that drive EKS waste through high resource requests.*

### Share recurring updates

Turn any saved view into a <Tooltip tip="A recurring cost report delivered on a schedule to Slack or email." cta="See Glossary" href="/docs/glossary#scheduled-report">Scheduled Report</Tooltip> and send it to your team.

<img src="https://mintcdn.com/costory/glWygnTKl6-bpdwy/images/use-cases/eks-cost-allocation/slack-report.png?fit=max&auto=format&n=glWygnTKl6-bpdwy&q=85&s=3d0a17fc9f24982de34745ab69d174e8" alt="Costory Slack report showing EKS cost changes" width="2096" height="1142" data-path="images/use-cases/eks-cost-allocation/slack-report.png" />

*Cost Reports send saved EKS cost views to the teams that own the workloads.*

### Surface cost changes in Digest

Add your Kubernetes labels to the <Tooltip tip="The hierarchical structure used in Digest to organize cost data." cta="See Glossary" href="/docs/glossary#cost-breakdown-tree">Cost Breakdown Tree</Tooltip> so <Tooltip tip="An automated monthly cost report that ranks cost changes by impact." cta="See Glossary" href="/docs/glossary#digest">Digest</Tooltip> highlights what changed.

<img src="https://mintcdn.com/costory/glWygnTKl6-bpdwy/images/use-cases/eks-cost-allocation/digest-tree.png?fit=max&auto=format&n=glWygnTKl6-bpdwy&q=85&s=2f36b52ffb5c91cc4ab45f475e9f94fa" alt="Costory Digest tree configured with EKS labels" width="2106" height="978" data-path="images/use-cases/eks-cost-allocation/digest-tree.png" />

*Digest can use EKS labels in its cost breakdown tree to explain workload-level cost changes.*

## Create a chargeback-ready EKS view

Use one saved view as the source of truth for team reporting:

1. Filter to container infrastructure costs, then group by the normalized team label.
2. Add a secondary group-by for `app`, `service`, or `namespace` so teams can see their main cost drivers.
3. Use [Contracted Cost](/docs/savings-plan-cost-fluctuation) when you want stable team-level reporting across Savings Plan movements.
4. Save the view with a name like `EKS chargeback by team`.
5. Schedule the view through [Cost Reports](/features/slack-reports) or add it to a [Dashboard](/features/dashboards).

For shared namespaces or platform services, create a <Tooltip tip="Rule-based dimensions that map cloud resources to business groupings like teams, products, or environments." cta="See Glossary" href="/docs/glossary#virtual-dimensions">virtual dimension</Tooltip> that assigns the cost to the teams that consume the service.

## Next steps

<CardGroup>
  <Card title="Explore costs by cluster and label" href="/features/cost-explorer">
    Use <Tooltip tip="Costory's main interface for exploring cloud costs across providers." cta="See Glossary" href="/docs/glossary#cost-explorer">Explorer</Tooltip> to drill into EKS costs by cluster, namespace, and label.
  </Card>

  <Card title="Set up Cost Reports" href="/features/slack-reports">
    Turn saved views into a <Tooltip tip="A recurring cost report delivered on a schedule to Slack or email." cta="See Glossary" href="/docs/glossary#scheduled-report">Scheduled Report</Tooltip> and share weekly or monthly updates.
  </Card>

  <Card title="Configure monthly cost summaries" href="/features/digest">
    Tune the <Tooltip tip="The hierarchical structure used in Digest to organize cost data." cta="See Glossary" href="/docs/glossary#cost-breakdown-tree">Cost Breakdown Tree</Tooltip> so <Tooltip tip="An automated monthly cost report that ranks cost changes by impact." cta="See Glossary" href="/docs/glossary#digest">Digest</Tooltip> highlights what changed.
  </Card>

  <Card title="Measure Kubernetes efficiency" href="/use-cases/k8s_waste/visibility">
    Quantify <Tooltip tip="Waste expressed as a percentage of total cluster or node pool capacity." cta="See Glossary" href="/docs/glossary#waste-ratio">waste ratio</Tooltip> and track over-provisioned clusters.
  </Card>
</CardGroup>

## FAQ

<AccordionGroup>
  <Accordion title="Do I need to install an agent on my cluster?">
    The option you choose determines agent requirements. AWS <Tooltip tip="An AWS feature that breaks down container costs (EKS, ECS) to individual pod labels." cta="See Glossary" href="/docs/glossary#split-cost-allocation">Split Cost Allocation</Tooltip> does not require an agent in your cluster. AWS-managed usage metrics require a collector or agent to send metrics from the cluster. Kubecost and OpenCost require an agent on each cluster.
  </Accordion>

  <Accordion title="How long does it take for EKS data to show up in Costory?">
    Expect a 2-3 day delay after enabling <Tooltip tip="An AWS feature that breaks down container costs (EKS, ECS) to individual pod labels." cta="See Glossary" href="/docs/glossary#split-cost-allocation">Split Cost Allocation</Tooltip> and activating <Tooltip tip="Tags that must be activated in billing before they appear in reports." cta="See Glossary" href="/docs/glossary#cost-allocation-tags">Cost Allocation Tags</Tooltip>. The data must first appear in your <Tooltip tip="AWS's detailed billing export, the raw data source for AWS cost analysis." cta="See Glossary" href="/docs/glossary#cur">CUR</Tooltip>, then be ingested by Costory. For Kubecost or OpenCost, timing depends on the S3 export schedule.
  </Accordion>

  <Accordion title="What labels should I standardize for chargeback?">
    Start with `team`, `app` or `service`, and `env`. Standardizing these labels across clusters gives you consistent <Tooltip tip="The process of assigning shared or untagged cloud costs to teams, products, or environments." cta="See Glossary" href="/docs/glossary#cost-allocation">cost allocation</Tooltip> and <Tooltip tip="Billing internal teams for their share of shared cloud costs." cta="See Glossary" href="/docs/glossary#chargeback">chargeback</Tooltip> reporting.
  </Accordion>

  <Accordion title="Why do some workloads show up as unallocated?">
    Unallocated costs usually mean the pod or underlying resource does not have the label you are grouping by, or the label has not appeared in the <Tooltip tip="AWS's detailed billing export, the raw data source for AWS cost analysis." cta="See Glossary" href="/docs/glossary#cur">CUR</Tooltip> yet. Check the deployment labels, confirm the relevant <Tooltip tip="Tags that must be activated in billing before they appear in reports." cta="See Glossary" href="/docs/glossary#cost-allocation-tags">Cost Allocation Tags</Tooltip> are active, then wait for the next export.
  </Accordion>

  <Accordion title="Should I allocate EKS costs by requests or actual usage?">
    Use requests when you want simple, stable allocation that reflects Kubernetes scheduling decisions. Use actual usage when you want allocation closer to what workloads consumed. Actual usage requires CloudWatch, Amazon Managed Service for Prometheus, or another usage data source.
  </Accordion>

  <Accordion title="How should I handle shared platform workloads?">
    Keep the original workload labels for investigation, then add a <Tooltip tip="Rule-based dimensions that map cloud resources to business groupings like teams, products, or environments." cta="See Glossary" href="/docs/glossary#virtual-dimensions">virtual dimension</Tooltip> for reporting. For example, allocate observability, ingress, or CI runner costs to consuming teams based on namespace, service ownership, or another usage metric.
  </Accordion>
</AccordionGroup>
