Skip to main content
Version: 2.0 🆕

Configurations

The Configurations page lets you manage configurations for Cost Visibility in Devtron. You can:

  • Set the default currency for all cost-related data.
  • Enable or disable cost tracking for your connected clusters.

Currency (Default)​

You can select your preferred currency as default.


Enable Cost Tracking​

To enable cost visibility for a cluster, follow the below steps:

  1. Choose your preferred cluster, and click on Off/Enabled. An Edit Cluster modal window will open.

  2. Enable the toggle next to Enable cost tracking.

  3. Select the cloud provider in which you have created your cluster.

  4. Based on the cloud provider you need to do the following configurations:

Enable Cost Visibility for GCP​

To enable cost visibility for Google Cloud in Devtron, you need to generate an API key and use it to connect Devtron with your GCP account.

  1. Generate the API key using standard Google Cloud API key documentation.

  2. Now go back to the Edit cluster modal window, and enter the API key in the Cloud Provider API Key field.

info

If you face any issues while enabling or configuring the Cost Visibility module, reach out to Devtron Support Team for assistance.

  1. Enter Prometheus endpoint of your cluster. Refer Fetching Prometheus Endpoint to learn more.
warning

Prometheus endpoint should be publicly exposed for the cost visibility to work.

  1. Click Save, cost visibility will be enabled for the cluster.
Note

After enabling cost visibility, you will see your cluster information after 1 hour in cost visibility module.


Fetching Prometheus Endpoint​

Note

Ensure GitOps is configured before deploying Prometheus. If not, Prometheus will default to being deployed via Helm.

Installing Prometheus​

  1. Go to the Chart Store and search for prometheus. Use the Prometheus community's kube-prometheus-stack chart to deploy Prometheus.

    Figure 1: Chart Store

  2. After selecting the chart, configure these values as needed before deployment.

    kube-state-metrics: 
    metricLabelsAllowlist:
    - pods=[*]

    serviceMonitorSelectorNilUsesHelmValues: false
    podMonitorSelectorNilUsesHelmValues: false

    Search for the above parameters, and update them as shown (or customize as needed).

    Figure 2a: Prometheus Chart Configuration

    Figure 2b: Prometheus Chart Configuration (cont.)

  3. Enable upgradeJob parameter to install CRDs:

    Since Helm does not automatically apply CRDs, you need to enable the upgradeJob parameter in the Helm chart to ensure CRDs are applied before deploying Prometheus.

    In the Prometheus Helm chart settings, locate the upgradeJob parameter and set it to true if it is false.

    Figure 3: upgradeJob Parameter

  4. After enabling the parameter, click Deploy Chart.

While deploying kube-prometheus-stack chart, the deployment status may show as Timed out, and some CustomResourceDefinitions (CRDs) may appear as Failed. This behavior is expected and does not require any action from you.

Figure 4a: Deployment Timed Out

Figure 4b: CRDs Failed

This occurs because certain Prometheus CRDs are large in size, which can lead to temporary sync issues during deployment, but, this does not impact the functionality of the Prometheus components.

ArgoCD handles such cases automatically and the kube-prometheus-stack will continue to function as expected.

  1. After the chart is deployed successfully, you need to expose the Prometheus endpoint publicly.
info

If you face any issues while enabling or configuring the Cost Visibility module, please contact the Devtron Support Team for assistance.