Kubecost is a Helm chart repository that provides cost visibility and resource allocation tracking for Kubernetes environments. The project serves as the deployment mechanism for the Kubecost product, which enables teams to understand both current and historical spending across Kubernetes clusters that support multiple applications, teams, and departments. This repository specifically hosts the Helm tarball distribution, making it the primary installation method for deploying Kubecost to Kubernetes 1.8 or higher clusters.
The core functionality of Kubecost centers on real-time cost allocation across multiple Kubernetes abstractions including Services, Deployments, Namespaces, labels, StatefulSets, DaemonSets, Pods, and containers. The system integrates with major cloud provider billing APIs from AWS, Azure, and GCP to enable dynamic asset pricing. For organizations running on-premises Kubernetes clusters, Kubecost supports custom pricing sheets to maintain cost transparency without cloud provider integrations. The platform allocates costs for in-cluster resources such as CPU, GPU, memory, and persistent volumes, while also tracking out-of-cluster resources like AWS RDS instances, S3 buckets, and GCP equivalents.
Kubecost's pricing model collects data from cloud providers to assign real-time costs per CPU-hour, GPU-hour, storage GB-hour, and RAM GB-hour based on the node where workloads run or the storage class provisioned. This approach accounts for regional differences and usage types such as on-demand versus preemptible instances. For scenarios where cloud providers do not explicitly provide RAM or CPU prices, Kubecost normalizes pricing based on configurable base CPU and RAM price inputs, maintaining the ratio between components while ensuring the total equals the node's actual cost. Resource allocation to individual pods and containers uses time-weighted maximums of resource requests and usage over measured periods, with special handling for BestEffort quality of service pods that rely solely on usage data.
The repository includes multiple interfaces for accessing cost data. Users can interact with Kubecost through a web-based user interface, programmatic Cost APIs, a kubectl plugin called kubectl-cost for command-line access, and a Prometheus metrics exporter endpoint for integration with existing monitoring infrastructure. The project is distributed under the Apache License 2.0 as free and open source software, with contribution guidelines referencing the OpenCost project's contribution process.
Installation via Helm is positioned as faster than building from source and includes all necessary dependencies. The system requires kube-state-metrics, Node exporter, and Prometheus as prerequisites. Configuration options are managed through a values file that allows customization of parameters including AWS Spot bid prices for accurate allocation. The repository documentation addresses common implementation questions regarding cost measurement methodologies, resource allocation strategies, and cloud provider integration requirements, with guidance on obtaining necessary API keys for production deployments.