Connecting Kubernetes (OpenCost)

Integrate OpenCost to get real-time visibility into your Kubernetes cluster costs.

What is OpenCost?

OpenCost is an open-source CNCF project for monitoring Kubernetes cloud costs. Neurals integrates with OpenCost to provide unified reporting.

Step 1: Install OpenCost

Install OpenCost using Helm:

helm install opencost opencost/opencost \
  --namespace opencost \
  --create-namespace \
  --set opencost.exporter.enabled=true \
  --set opencost.prometheus.external.url=http://my-prometheus.monitoring.svc:9090

Step 2: Expose OpenCost API

To allow Neurals to access OpenCost, you need to expose the API endpoint. For internal clusters, you can use port-forwarding or an Ingress.

kubectl port-forward -n opencost service/opencost 9003:9003

Step 3: Configure Neurals Agent

Update your agent configuration to point to the OpenCost URL.

# packages/ingestion/config.yaml
opencost:
  enabled: true
  url: "http://opencost.opencost.svc:9003"
  refresh_interval: "1h"

Supported Metrics