Skip to main content

Documentation Index

Fetch the complete documentation index at: https://qovery-update-kubecost-tuto.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Kubecost provides real-time cost visibility and insights for your Kubernetes clusters. This guide shows you how to deploy Kubecost on your Qovery cluster to track and optimize your infrastructure spending.
Prerequisites: You need a functioning Qovery cluster before starting this tutorial.
This tutorial takes approximately 5 minutes to complete.

Installation

This tutorial is based on a specific version of Kubecost. We have created it to assist our users, but Qovery is not responsible for any configuration issues — please contact Kubecost support for chart-specific questions.

Step 1: Add the Kubecost Helm Repository

1

Add Helm Repository

In Qovery Console:
  1. Go to SettingsHelm Repositories
  2. Click Add Repository
  3. Configure:
    • Repository name: Kubecost
    • Kind: HTTPS
    • Repository URL: https://kubecost.github.io/kubecost
See Helm Repository Management for more details.

Step 2: Create the Kubecost Helm Service

1

Create Helm Service

In your environment:
  1. Click CreateHelm Chart
  2. Configure:
    • Application name: kubecost
    • Helm source: Helm repository
    • Repository: Kubecost
    • Chart name: kubecost
    • Version: 3.1.8 (or latest from Kubecost)
    • Allow cluster-wide resources: ✔️
See Helm Charts for more details on creating a Helm service.

Step 3: Store Secrets and Variables

1

Add optional variables

Open the Kubecost service overview and go to the Variables section.Add these variables as needed:
VariableValueScopeSecretNotes
KUBECOST_TOKEN<your_token>Service✔️Optional — required for Kubecost Business/Enterprise features
See Environment Variables for more details on managing variables in Qovery.

Step 4: Configure Values Override

In the Override as file section of your Helm service, add the following configuration:
global:
  clusterId: my-cluster-name  # A unique identifier for your cluster in Kubecost
If you have a Kubecost token, add it to the override:
global:
  clusterId: my-cluster-name

kubecostToken: qovery.env.KUBECOST_TOKEN
How qovery.env.* works: At deploy time, Qovery replaces qovery.env.KUBECOST_TOKEN with the actual value of the KUBECOST_TOKEN variable. The real value never appears in the Qovery UI — it is only injected at Helm install time. See Environment Variables in Helm Values for more details.

Step 5: Deploy the Chart

1

Deploy

  1. Click the Deploy button
  2. Follow the deployment logs
  3. Verify Kubecost pods are running

Step 6: Access Kubecost via Port Forward

Instead of exposing Kubecost publicly, use kubectl port-forward to access the dashboard securely from your local machine.
1

Connect to your cluster

Download your cluster’s kubeconfig from the Qovery Console:
  1. Go to OrganizationClusters
  2. Click on your cluster
  3. Open the Actions menu and select Get Kubeconfig
Once downloaded, configure kubectl to use it:
export KUBECONFIG=/path/to/downloaded/kubeconfig.yaml
Verify the connection:
kubectl get nodes
See Cluster Kubeconfig for more details.
2

Get your environment namespace

In Qovery Console, go to your environment and find the Kubernetes namespace in the environment details. It follows the pattern z<env-id-prefix>-<env-name>.Alternatively, list namespaces on your cluster:
kubectl get namespaces
3

Find the Kubecost service name

List services in your namespace to find the Kubecost dashboard service:
kubectl get svc -n <namespace> | grep frontend
4

Forward the Kubecost port

Run the following command, replacing <namespace> and <service-name> with the values from the previous steps:
kubectl port-forward svc/<service-name> 9090:9090 -n <namespace>
Then open your browser at http://localhost:9090.
Keep the terminal open while using Kubecost — closing it will terminate the port-forward session.

Conclusion

You’ve successfully deployed Kubecost on your Qovery cluster. You can now access the Kubecost dashboard to monitor your Kubernetes costs and get optimization recommendations. To learn more about using Kubecost, check out their Getting Started guide.

Next Steps

Kubecost Documentation

Learn more about Kubecost features

Optimize

Optimization strategies with Qovery

Qovery Observe

Built-in observability

Datadog

Advanced monitoring with Datadog