3 minute read

Learn how to use Kubecost’s AWS optimized deployment bundle for EKS cluster cost visibility.

image alt text

According to Cloud Native Computing Foundation (CNCF) survey in 2021, 96% of organizations are either using or evaluating Kubernetes. So many customers are telling us that they have been looking for ways to track Kubernetes spending accurately, allocate costs, and charge back organization units (teams, departments, etc). These are challenges that Kubecost can help customers solve, so they can focus on innovating and delivering their business values. In August 2022, Kubecost and Amazon Web Services (AWS) announced our collaboration to deliver a cost monitoring solution to Amazon Elastic Kubernetes Services (Amazon EKS) customers. Let’s learn more about this collaboration in this article.

How this collaboration helps Amazon EKS customers

Optimized configuration: Kubecost and AWS deliver an optimized bundle specifically for the Amazon EKS cluster in this collaboration. It was reviewed and verified by both Kubecost and AWS.

Free of charge: the optimized bundle is provided to customers to use on a single cluster without needing a license.

Best in class customer service: the Kubecost installation using this optimized bundle will receive support from both AWS support (depending on the customer’s AWS support contract) and the Kubecost support team.

Hosted in Amazon ECR public gallery: container images of this optimized bundle are hosted, publicly available, and highly available in Amazon Elastic Containers Registry (Amazon ECR) public gallery at https://gallery.ecr.aws/kubecost/ . They are continuously maintaining and updating so customers can confidently use it in the production system.

Easy to install: customers can easily install Kubecost in the existing Amazon EKS cluster with a single command and start tracking Amazon EKS spending and viewing costs broken down by Kubernetes resources, including pods, nodes, namespaces, labels, and more in a few minutes.

Let’s take a look at customer experience in the next section.

Customer experience

When Kubecost is installed with a single Helm command, container images and helm chart are pulled from the verified Amazon ECR public gallery into Amazon EKS cluster. Kubecost is ready in a few minutes and customers can start exposing Kubecost user interface (UI) for their team to use. The following diagram illustrates the user experience:

Customer experience

The following screenshot shows an example of Kubecost’s overview page after being installed and exposed:


In the next section, we will go deeper into the overview of Kubecost’s architecture.

Kubecost’s architecture overview

At a high level, Kubecost is installed in the Amazon EKS cluster, including these core components:

Frontend is built based on Nginx. It is mainly responsible for handling requests to cost-model (back-end) for cost allocation calculations and then displaying the data on the Kubecost UI for customer’s views.

Cost-model is the back-end for the API calls. It is also responsible for cost allocation calculations by ingesting, querying metrics from AWS public pricing, AWS Cost & Usage report (CUR) data (optional), and Prometheus scrape metrics.

Prometheus is responsible for scraping metrics from the Amazon EKS cluster and other Kubernetes components like cAdvisor, node exporter, etc and Kubecost’s /metrics endpoint. Prometheus also works as a time-series database storing all metrics for Kubecost to query.

When Kubecost is installed on the Amazon EKS cluster, Kubecost’s (cost-analyzer) pod starts ingesting AWS public pricing data via API calls, queries metrics from Prometheus, and performs initial cost allocation calculations. Then, that data is exposed via the /metrics endpoint to allow Prometheus to scrape and store them. Next, the frontend displays the data to Kubecost’s UI. Finally, Customers can expose Kubecost’s UI for their team to start using Kubecost.

Optionally, customers can configure AWS CUR integration. This configuration enables Kubecost to have accurate pricing information from the customer’s AWS accounts, such as Enterprise Discount Programs (EDR), Reserved Instance usage (RI), Saving Plans, Spot instance usage, and more. Customers can learn more about configuring AWS CUR integration at this documentation.

The following diagram illustrates the architecture:


Additional resources

To learn more about the installation process and this collaboration, customers can refer to these additional resources:

Customers can also reach out to the Kubecost team for more information here