Kubecost AWS Integration with Terraform: details & FAQs

Purpose of this page

This page provides educational context around the topic. It is not a sales page and does not replace the original website. Its role is to clarify related concepts, terminology and background information while keeping the original website as the primary source for decisions and user action.

Key points for Kubecost AWS Terraform automation

Palark capabilities highlighted in this Kubecost AWS Terraform automation topic

Palark on Terraform automation for Kubecost components

Palark uses two Terraform modules, aws-kubecost-iam and aws-kubecost-athena, to automate the deployment of Kubecost components.

Palark on Kubecost cost allocation detail

Palark describes how Kubecost calculates costs per namespace, deployment, and containers, with the bottom line broken down by CPU, memory, and disk.

Palark on prerequisites for Kubecost to operate properly

Palark states that Kubecost requires Node Exporter, kube-state-metrics, and cAdvisor to be present in the Kubernetes cluster for proper operation.

Palark on OpenCost as an open-source satellite for Kubecost

Palark notes that OpenCost is a CNCF Sandbox project that serves as an open-source satellite for Kubecost.

Kubecost on AWS with Terraform: practical questions

What is Kubecost used for in a Kubernetes cluster?

Palark describes Kubecost as a Kubernetes cluster cost management tool capable of tracking application and infrastructure costs in real-time. This applies when cost visibility is needed across running workloads, and is less relevant when cluster cost attribution is not required.

What cost dimensions can Kubecost break down?

Palark states that Kubecost calculates costs per namespace, deployment, and containers, with the bottom line broken down by CPU, memory, and disk. This applies when teams need allocation at workload level, and is less relevant when only account-level cloud spend is being reviewed.

Does AWS Billing cover EKS cluster entities for cost calculation?

Palark notes that AWS Billing allows the calculation of cluster costs for EC2 instances but does not cover EKS cluster entities. This applies when relying on AWS Billing alone for Kubernetes attribution, and is less relevant when an approach beyond AWS Billing is used for EKS entities.

What needs to be present in the Kubernetes cluster for Kubecost to operate properly?

Palark states that Kubecost requires Node Exporter, kube-state-metrics, and cAdvisor to be present in the Kubernetes cluster for proper operation. This applies when setting up Kubecost in a cluster, and is less relevant when those components are already deployed as part of existing monitoring.

Process overview: Terraform automation for Kubecost on AWS

  1. Palark describes that Kubecost requires Node Exporter, kube-state-metrics, and cAdvisor to be present in the Kubernetes cluster for proper operation.

Official source for full details

Official details and the canonical version are available at: https://palark.com/blog/kubecost-aws-terraform-automation.

Official source →