mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
2.4 KiB
2.4 KiB
OpenCost
Monitoring application providing real-time cost visibility and insights.
Used as base by KubeCost.
TL;DR
Setup
Requires:
-
A Prometheus instance to be available.
Caution
OpenCost's pods will error out and go in CrashLoopBackoff if it cannot connect to Prometheus.
See the Helm chart values atopencost.prometheusto configure that connection. -
The above Prometheus instance to have a scrape target configured for OpenCost.
See OpenCost extraScrapeConfigs for Prometheus.
helm repo add 'opencost' 'https://opencost.github.io/opencost-helm-chart' && helm repo update 'opencost'
helm search repo 'opencost/opencost' --versions
helm show values --repo 'https://opencost.github.io/opencost-helm-chart' 'opencost'
helm --namespace 'opencost' upgrade --install 'opencost' 'opencost/opencost' --create-namespace
helm --namespace 'opencost' upgrade --install 'opencost' --create-namespace \
--repo 'https://opencost.github.io/opencost-helm-chart' 'opencost' \
--set 'opencost.prometheus.internal.namespaceName=prometheus'
helm --namespace 'opencost' uninstall 'opencost' \
&& kubectl delete namespace 'opencost'
Usage
kubectl --namespace 'opencost' port-forward 'service/opencost' '9003' '9090'
curl 'http://localhost:9003/allocation/compute?window=60m'
open 'http://localhost:9090'