Enable cost allocation in AWS for Kubernetes cluster
Enable cost allocation for a Kubernetes cluster in AWS Management Console before you run a AWS Billing download job to view the Kubernetes spend.
Before you begin
Role required: AWS Management Console administrator
- You should be familiar with AWS policies.
- Install Discovery and Service Mapping Patterns application (sn_itom_pattern) 1.10.2 or higher. For more information, see Install Discovery and Service Mapping Patterns.
- Install CMDB CI Class Models (sn_cmdb_ci_class) version 1.53.1 or higher. For more information, see CMDB CI Class Models app.
- To set up Kubernetes discovery, see Kubernetes discovery using patterns.
Procedure
Log in to the AWS Management Console.
Search for and select Cost Allocation Tags.
Select the User-defined cost allocation tags tab.
Activate the following Kubernetes tags to appear in the billing data:
- Static Tag key
- aws:eks:cluster-name
- user:eks:cluster-name
- eks:cluster-name
- Dynamic Tag key
- kubernetes.io/cluster/<Cluster-Name>: shared/owned
- alpha.eksctl.io/cluster-name: <Cluster-Name>
- Static Tag key
Result
The cost allocation for the selected Kubernetes cluster is enabled and you can view the Kubernetes spend.