By adopting Kubernetes, organizations can unlock a range of cost benefits. With workloads configured to consume only the necessary resources and dynamically scale to meet demand, businesses can optimize resource usage while reducing downtime. Additionally, Kubernetes allows organizations to deploy multiple applications from various teams or business units to a single cluster, resulting in significantly reduced infrastructure costs. However, this multitenancy approach poses a new challenge.
Consider this scenario: your cluster generates $100/day in infrastructure spend with a shared set of resources split across 10 developer teams. If 1 team consumes 80% of the cluster’s resources, it does not make sense to split infrastructure costs evenly across all teams at $10/day. Instead, your organization may request teams to cover a proportion of the overall cost commensurate with their usage, which is not captured in your Azure bill to date. Without cost monitoring, organizations struggle to accurately track infrastructure costs for applications, Kubernetes constructs, and organizational constructs. This makes it difficult to achieve cost efficiency and perform internal chargeback.
The OpenCost project was launched to address these challenges. With original code provided by Kubecost, OpenCost provides aKubernetes cost monitoring standard for the industry. OpenCost is an open-source, vendor-neutral CNCF sandbox project that recently became a FinOps Certified Solution. The project provides real-time visibility, offering a new level of transparency on Kubernetes cloud spend.
Microsoft joins the OpenCost community as a contributing partner
We are excited to share that Microsoft has joined the OpenCost communityas a contributing partner to bring cost visibility and monitoring to AKS customers. Our initial contributions add new functionality to both AKS and OpenCost: Azure resource prices and cost export.
Azure resource prices
The Azure Consumption Price Sheet API provides price sheet data for your subscription and billing scope with consumption and Azure Savings Plan discounts accounted for. We’ve enabled usage of this API within OpenCost for more accurate pricing and cost allocation data that aligns with customer-specific Azure resource prices. Refer to OpenCost Azure Price Configuration docs for additional details.
The cost export feature allows you to generate daily cost allocation and utilization data (namespace, controller, service, pod granularity) in a CSV format that can be pushed to an Azure Storage Account, other cloud provider storage, or local storage. Metrics in the CSV include:
The export is simple to set up and requires minimal configuration. Easily incorporate this data into external BI tooling such as SQL, Synapse, or existing data pipelines. Refer to OpenCost CSV Export docs for additional details.
Excited about OpenCost and looking to get involved? Find the OpenCost code, Helm chart, and specifications at https://github.com/opencost. Join the #opencost channel in the CNCF Slack. Subscribe to the OpenCost community calendar and attend the working group meetings. We look forward to collaborating with you and the broader OpenCost community!