Learn how to use Kubecost’s AWS optimized deployment bundle for EKS cluster cost visibility.
According to a Cloud Native Computing Foundation (CNCF) survey in 2022, 89% of end users are either using or evaluating Kubernetes. With this in mind, teams are increasingly looking for ways to track Kubernetes spending accurately, allocate cloud costs, and charge back organization units (teams, departments, etc).
In August 2022, Kubecost and Amazon Web Services (AWS) announced a collaboration to deliver a cost monitoring solution to Amazon Elastic Kubernetes Services (Amazon EKS) customers. This collaboration unlocks granular cost visibility, allowing EKS customers to effectively monitor EKS costs and uncover insights to optimize their Kubernetes infrastructure. This article will dive into common challenges in cost monitoring, the benefits of this collaboration, and how to get started.
Navigating Kubernetes Costs
As organizations increasingly adopt EKS for its scalability and efficiency, they often encounter difficulties in achieving precise cost tracking and allocation. These challenges can lead to inaccurate budgeting, inefficient resource utilization, and a lack of transparency in EKS cost monitoring.
- Complex Resource Utilization: EKS environments typically involve a mix of various resources, such as EC2 instances, and the utilization of these resources can be highly variable.
- Shared Resource Allocation: In Kubernetes, applications often share resources, which complicates the process of attributing costs to specific applications or teams.
- Granular Cost Visibility: EKS users often struggle to gain a detailed view of costs at a granular level, such as per namespace, cluster, pod, or other Kubernetes-specific dimensions. This granularity is crucial for effective cloud cost management and optimization.
- Manual Aggregation and Calculation: Before advanced cost monitoring tools, EKS users had to manually aggregate compute resource usage over a period to calculate costs. This manual process is not only time-consuming but also prone to errors.
- Inconsistent Cost Estimates: Many organizations rely on monthly estimates or do not monitor Kubernetes spending at all, leading to inconsistent and often inaccurate budgeting and financial planning.
These are challenges that Kubecost can help customers solve, so they can get back to innovating and delivering business value.
Kubecost and AWS Collaboration
EKS cost monitoring presents unique challenges, stemming from the dynamic and complex nature of Kubernetes-based cloud environments. However, the collaboration between Kubecost and AWS offers a solution. By combining Kubecost’s specialized Kubernetes cost monitoring capabilities with AWS’s robust cloud infrastructure, this partnership aims to address these challenges head-on, providing EKS users with enhanced tools and insights for more accurate and detailed cost analysis.
Key Solution Benefits
- Free of Charge: The optimized bundle is provided to customers to use on a single Kubernetes cluster without needing a license.
- Easy Installation and Usage: Customers can install Kubecost in a few minutes with a single command, then start tracking EKS cost broken down by Kubernetes resources, including pods, nodes, namespaces, labels, and more.
- 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.
- Integration with AWS Services: The collaboration ensures compatibility and integration with various AWS services, enhancing the utility and effectiveness of Kubecost in EKS environments.
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.
You can install Kubecost with a single Helm command, then container images and helm chart are pulled from the verified Amazon ECR public gallery into the Amazon EKS cluster. Kubecost is ready in minutes, so customers can start accessing data to unearth insights for EKS cost optimization.
Designed with a user-centric approach, the Kubecost UI consists of several key dashboards, each offering comprehensive cost visualization and analysis. These dashboards are not just about displaying data; they are interactive platforms that enable users to delve deep into their cost structures, understand spending patterns, and identify areas of inefficiency.
A core strength of the Kubecost UI is its ability to provide real-time visibility into costs across various dimensions such as namespaces, clusters, and pods. This level of detail is crucial for users seeking to allocate costs accurately and optimize resource usage effectively. Further, the UI goes beyond mere cost tracking by offering a suite of savings and governance tools. These tools empower users to uncover cost-saving opportunities, enforce budgetary controls, and implement cost-effective strategies.
Below is an overview diagram of the Kubecost UI:
Once installed, customers can access the main overview page, which contains several helpful panels for observing workload stats and trends:
Kubecost’s architecture overview
At a high level, Kubecost is installed in the Amazon EKS cluster and includes 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
/metricsendpoint. Prometheus also works as a time-series database storing all metrics for Kubecost to query.
Below is a diagram of Kubecost’s architecture:
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 instances, and more. Customers can learn more about configuring AWS CUR integration at this documentation.
To start leveraging the benefits of the Kubecost and Amazon EKS collaboration, the first step is to implement Kubecost in your EKS environment. The process is straightforward and designed for ease of integration. Once installed, you can generate the Kubecost dashboard endpoint and access the cost monitoring dashboard via your web browser. This dashboard will provide a comprehensive view of your EKS cluster costs, broken down by Kubernetes resources, and enable you to track and manage spending effectively. Teams often start with looking at Kubernetes cost trends for their teams, or searching for quick cost savings.
Best Practices to Get Started
- Regularly Monitor and Review Costs: Make it a routine to frequently check the Kubecost dashboard. Regular monitoring helps in identifying and addressing cost anomalies promptly.
- Set Up Alerts and Budgets: Utilize Kubecost’s alerting feature to get notified about cost overruns. Setting up budgets for different Kubernetes resources or projects helps in maintaining financial control and preventing unexpected expenses.
- Integrate with AWS CUR: Leverage the AWS CUR integration for more accurate and AWS-specific pricing, including discounts and reserved instance usage. This ensures your cost analysis is as precise as possible.
- Optimize Resource Utilization: Identify underutilized resources with Kubecost and adjust them accordingly. This could mean downsizing or eliminating unnecessary resources, leading to significant cost savings.
- Implement Chargeback or Showback Models: If applicable, use Kubecost to implement chargeback or showback models. This helps in attributing Kubernetes costs to the right departments or teams, promoting accountability and efficient resource usage.
- Leverage Kubecost’s Recommendations: Pay attention to the cost-saving recommendations provided by Kubecost. These suggestions are based on your specific usage patterns and can guide effective cost-saving strategies.
By following these steps, you can quickly set up Kubecost and start benefiting from the enhanced visibility and cloud cost management capabilities offered by this collaboration.
To learn more about the installation process and this collaboration, customers can refer to these additional resources:
The collaboration between Kubecost and AWS marks a significant advancement in cost monitoring for EKS users. By leveraging the optimized deployment bundle from Kubecost, customers gain unprecedented visibility into their EKS cluster costs, benefiting from an easy-to-install solution that’s both effective and free for single-cluster use. This collaboration not only simplifies the process of tracking and allocating Kubernetes spending, but also ensures that organizations can better manage their resources, aligning their operational expenditures with business objectives. With the support of both AWS and Kubecost teams, users are equipped to navigate the complexities of Kubernetes cloud cost management, making it easier to innovate and deliver value. Get started today by installing Kubecost, and start optimizing your EKS infrastructure.
Kubecost offers real-time visibility and monitoring of Kubernetes costs, playing a crucial role in efficient cloud cost management. Kubecost can run on any Kubernetes environment, including Azure Kubernetes Service (AKS), Google Kubernetes Engine (GKE), Amazon Elastic Kubernetes Service (EKS), and on-prem. With capabilities like multi-cluster visibility and custom reporting, we are tailored to meet the diverse needs of complex enterprises, making us an effective tool for effective Kubernetes cost management and optimization. To learn more, reach out via email (team@kubecost), Slack, or visit our website.
We are always interviewing engineers, and we are also increasingly looking for new hires in non-technical roles in which you could have a huge impact steering the direction of the company’s growth.
Check out our open roles to learn more!