Note: This feature is only officially supported on Kubecost Enterprise plans.
There are two primary methods to aggregate all cluster information back to a single Kubecost UI described in Multi-Cluster Kubecost.
Below is the configuration guide using Kubecost Thanos Federation.
- 2.Repeat the process in Step 1 for each additional secondary cluster, with the following Thanos recommendations:
Thanos modules can be disabled in thanos/values.yaml, or in values-thanos.yaml if overriding these values from a values-thanos.yaml file supplied from command line (
- Reuse your existing storage bucket and access credentials.
- Do not deploy multiple instances of
- Optionally deploy
thanos-bucketin each additional cluster, but it is not required.
- Optionally disable
thanos.query(Clusters with store/query disabled will only have access to their metrics but will still write to the global bucket.)
helm upgrade kubecost -f values.yaml -f values-thanos.yaml), or by passing these parameters directly via helm install or upgrade as follows:--set thanos.compact.enabled=false --set thanos.bucket.enabled=falseYou can also optionally disable
thanos.queryFrontendwith thanos/values.yaml or with these flags:--set thanos.query.enabled=false --set thanos.store.enabled=false --set thanos.queryFrontend.enabled=false
- 3.Ensure you provide a unique identifier for
prometheus.server.global.external_labels.cluster_idto have additional clusters be visible in the Kubecost product, e.g.
cluster_idcan be replaced with another label (e.g.
cluster) by modifying .Values.kubecostModel.promClusterIDLabel.
Sample configurations for each cloud provider can be found here: https://github.com/kubecost/poc-common-configurations/