This repository contains the Helm chart templates for the development of Kubecost, an enterprise-grade application to monitor and manage Kubernetes spend. Please see the website for more details on what Kubecost can do for you and the official documentation IBM Docs, or contact team-kubecost@wwpdl.vnet.ibm.com for assistance.
Kubecost strives to support as many versions of Kubernetes as possible. Below is the version support matrix which has been tested. Versions outside of the stated range may still work but are untested.
| Chart Version | Kubernetes Min | Kubernetes Max | Notes |
|---|---|---|---|
| 2.8 | 1.22 | 1.34 | Final feature release of Kubecost 2.x |
| 2.9 | 1.22 | 1.34 | Intermediate step to upgrade to 3.x |
| 3.0 | 1.29 | 1.34 | First release of Kubecost 3.x |
In order to upgrade from Kubecost 2.x to 3.x, it is recommended that all agents be updated to 2.9 for two days prior to upgrading to 3.0. See https://github.com/kubecost/kubecost/tree/v2.9/examples for how to upgrade to 2.9 before upgrading to 3.0.
Note: With the exception of the diagnostics compatibility section below, the agent data is backwards compatible with Kubecost 2.x. Which means there is flexibility in the order of upgrades. For example, the primary does not need to be upgraded first, though it is recommended to do so.
| Version | Database | Metrics Source |
|---|---|---|
| 2.x | DuckDB | Prometheus |
| 3.0 | ClickHouse | Direct |
Due to the new database, a complete re-ingestion of data will begin as soon as 3.x is installed. This will take anywhere from 20 minutes to 2 days to complete depending on the size of the dataset and performance of the storage backing the Persistent Volume. During this time, the UI will be available, but will show a progress indicator. Data will be imported from today and going backwards in time until the full history is available.
A Kubecost 3.0 primary cluster is compatible with 2.x agents and newer. 3.0 has significant changes to the agent (previously called secondaries). The old agent container was called cost-model. The new agent is now called the finops-agent.
The new agent has major benefits over the old agent:
- 10 minute metric granularity (cluster/node group/container right-sizing)
- up to 50% less memory usage
- more diagnostics data
| Primary Cluster Version | Agent Version | Agent Diagnostics Available in UI | Notes |
|---|---|---|---|
| 2.x | 2.x | Yes | |
| 2.x | 3.x | No | 10m metric granularity is not supported |
| 3.x | 2.x | No | |
| 3.x | 3.x | Yes |
To install the latest version of Kubecost via Helm, run the following command:
helm install kubecost \
--repo https://kubecost.github.io/kubecost kubecost \
--namespace kubecost --create-namespace \
--set global.clusterId=someclusternameAlternatively, add the Helm repository first and scan for updates:
helm repo add kubecost https://kubecost.github.io/kubecost/
helm repo update
helm install kubecost kubecost/kubecost -n kubecost --create-namespaceThe default branch of this repository is the develop branch. This branch is not stable and is subject to change. Please use the following command to show values available for the chart you are using:
helm show values kubecost/kubecost --version 3.0.3To install the beta/release candidates pass the --devel flag:
helm install kubecost \
--repo https://kubecost.github.io/kubecost kubecost \
--namespace kubecost --create-namespace \
--develTo install the nightly build, use the nightly-helm-chart repository:
helm install nightly \
--repo https://kubecost.github.io/nightly-helm-chart kubecost \
--namespace kubecost-nightly --create-namespaceUninstall the chart:
helm uninstall kubecost -n kubecostNote that when uninstalling, the persistent volume for the Kubecost metrics are not deleted. You can delete them manually by deleting the namespace:
kubectl delete namespace kubecost