Useful Kubecost Integration Information for OpenCost
• | CBI Mapping |
• | Repositories |
The following table lists the CBI mapping automatically from the CSV column to cost dimensions/measures:
CSV Column |
Dimensions/Measures |
Required |
Meaning |
|||||||||
Cluster |
|
Yes |
Kubernetes cluster name. |
|||||||||
Namespace |
Resource Group |
Yes |
Kubernetes cluster namespace name. |
|||||||||
Aggregation |
Resource Type |
Yes |
Desired aggregation level for cost allocation data to be collected, controlled by an input parameter for the export utility. Supported values are namespace, controller, and pod. Recommended level is pod. |
|||||||||
Controller |
- |
Yes |
Controller name. A value is populated if a unique value is available for the used aggregation level. |
|||||||||
Pod |
- |
Yes |
Pod ID. A value is populated if a unique value is available for the used aggregation level. |
|||||||||
Container |
- |
Yes |
Container name. A value is populated if a unique value is available for the used aggregation level. |
|||||||||
Node |
- |
Yes |
Node name. A value is populated if a unique value is available for the used aggregation level. |
|||||||||
ResourceID |
Resource ID |
Yes |
Kubernetes resource ID. Based on the aggregation level, the resource ID pattern is as follows:
|
|||||||||
Cost |
Cost |
Yes |
The total cost for this record in the currency specified by Currency. |
|||||||||
Currency |
Currency Code |
Yes |
The currency code is defaulted to USD. |
|||||||||
UsageType |
Usage Type |
Yes |
Represents the kind of usage incurred. For example, CPU usage, persistent volume usage, and so on. Sample values are cpuCost, ramCost, pvCost. |
|||||||||
UsageAmount |
Usage Amount |
Yes |
The amount of usage generated for this record. |
|||||||||
UsageUnit |
Usage Unit |
Yes |
The units that the Usage Amount metric is reported in. Sample values are cpuCoreHours, ramByteHours, pvBytesHours. |
|||||||||
ControllerKind |
- |
Yes |
A kind of controller. A value is populated if a unique value is available for the used aggregation level. Sample values are deployment, job, statefulset. |
|||||||||
ProviderID |
- |
Yes |
Provider ID for the node. A value is populated when the node is known. |
|||||||||
Labels |
- |
Yes |
Kubernetes labels of the resource. Can be used for defining custom dimensions. |
|||||||||
InvoiceYearMonth |
- |
Yes |
The month this usage was incurred. For example, 202305. |
|||||||||
InvoiceDate |
- |
Yes |
A UTC time in the RFC3339 format (for example, 2006-01-02T15:04:05Z) representing the date and time this usage was incurred. |
|||||||||
StartTime |
- |
Yes |
A UTC time in the RFC3339 format (for example, 2006-01-02T15:04:05Z) representing the start date and time for this record. |
|||||||||
EndTime |
- |
Yes |
A UTC time in the RFC3339 format (for example, 2006-01-02T15:04:05Z) representing the end date and time for this record. |
|||||||||
CloudProvider |
Cloud Provider |
No |
Can be set as the CBI parameter. Default value is Kubecost. |
|||||||||
ChargeType |
Line Item Type |
No |
Set to Usage. |
|||||||||
UsageCategory |
Category |
No |
Set to Compute. |
|||||||||
Service |
Service |
No |
Set to Kubernetes. |
|||||||||
BillSource |
Bill Source |
No |
Bill connect Id. |
|||||||||
Capability |
Capability |
No |
Set to csm. |
|||||||||
Manufacturer |
Manufacturer Name |
No |
Can be set as the CBI parameter. Default value is Kubecost. |
|||||||||
SpendType |
Spend Type |
No |
Set to Cloud. |
The following public repositories contain the source code and the image of the exporter:
• | Public GitHub Repository |
• | Public Image Registry |