Integrating with IBM Kubecost
You can maximize the benefits of IBM Kubecost and Instana by enhancing the Kubernetes cluster metrics that are gathered by Instana with cost and allocation usage obtained from Kubecost.
Instana uses the Kubecost REST APIs to collect the Cost and Allocation metrics. Both Instana and Kubecost must monitor the same Kubernetes cluster.
Support information
To make sure that the Kubecost sensor is compatible with your current setup, check the following support information sections:
Supported operating systems
The Kubecost sensor supports the same operating systems as the Instana host agent. For more information, see Installing the Instana agent on Kubernetes.
Supported Kubecost versions
The Kubecost sensor supports the latest Kubecost 2.x releases.
Prerequisites
Before you enable the Kubecost sensor, complete the following steps:
- Deploy the Instana agent in one or more Kubenetes clusters. For more information, see Installing the Instana agent on Kubernetes.
- Deploy Kubecost on the same Kubernetes cluster that the Instana agent is set up to monitor. For more information, see Installation
.
- After Kubecost is deployed, add the license key to enable Kubecost to collect usage metrics. For more information, see Adding a Product Key
.
- Configure the Instana Kubecost sensor to collect Cost and Allocation metrics from this cluster by following the steps in the next section.
Configuring the Kubecost sensor
Instana collects the cost and allocation data using the Kubecost REST APIs. To enable and configure the sensor, update the agent configuration file as shown in the following example:
# Kubecost Sensor
com.instana.plugin.kubecost:
remote:
- url: '<your-kubecost-address>'
poll_rate: 120 # seconds
clusters: #List of one or more k8s cluster names.
- 'demo-cluster1'
Configuration parameters
Parameter | Description |
---|---|
url |
Kubecost address, example: http://kubecost.demo.xyz |
poll_rate |
The frequency at which the metrics are fetched from Kubecost. The default frequency is 120 seconds. |
clusters |
The list of clusters that are monitored by Kubecost. These clusters must be monitored by both the Instana agent and Kubecost. |
Viewing Cost Metrics
After you enable the Kubecost sensor, you can view the Cost and Allocation metrics for the monitored cluster in the Instana UI. To view the metrics, complete the following steps:
- Go to Platforms > Kubernetes.
- Click the cluster in which Kubecost is deployed, from the list shown in the Clusters tab.
- Go to the Cost tab.
You can view the Cost and Allocation metrics captured from Kubecost on the Cost tab.

To view detailed usage per namespace, check the Cumulative cost by namespace table.

Metrics
The following table outlines the frequency of metric collection by the Kubecost sensor:
Metric | Description |
---|---|
CPU |
The total cost of node CPU attributed to each workload over the chosen window. |
GPU |
The total cost of node CPU attributed to each workload over the chosen window. |
Network |
The total cost of network egress and ingress attributed to each workload over the chosen window. |
Persistent volume |
The total cost of persistent volume storage attributed to each workload over the chosen window. |
Load Balancer |
The total cost of load balancers attributed to each workload over the chosen window. |
Shared |
The total shared overhead cost attributed to each workload over the chosen window. |
Total efficiency |
Cost weighted ratio of RAM and CPU usage to configured RAM and CPU usage. |
RAM |
The total cost of node RAM attributed to each workload over the chosen window. |
Total cost |
The total cost attributed to each workload over the chosen window. |