Concepts
TOC
Opencost
OpenCost is an open-source Kubernetes cost monitoring and management tool designed to track and analyze resource usage and costs in Kubernetes clusters in real time. It provides accurate resource metering data to help users optimize resource allocation and control costs.
For more information, please refer to the OpenCost official website.
Cost Model
A Cost Model defines the billing rules and pricing for resources within clusters. It includes:
- Billing Items: Resources to be billed (CPU, Memory, Storage)
- Billing Methods: How resources are measured and billed
- Unit Prices: Base pricing for each resource type
- Label-based Pricing: Differentiated pricing based on labels
- Cluster Association: Which clusters the model applies to
Cost models help you define the resources and unit prices that need to be billed in clusters. The platform will measure and bill for each cluster based on the cost model.
Billing Method Description
Current statistical issues will be addressed in future versions:
- When a StatefulSet POD is stopped and restarted, the platform will use the earliest running time of the POD on that day as the start time and the latest running time as the end time, while ignoring the time in between when the POD was not running.