Skip to content

alyvusal/opencost

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

OpenCost

  • Purpose: An open-source, CNCF-incubating project for real-time cost monitoring across containerized environments and multi-cloud setups
  • Features: Offers cost allocation by Kubernetes entities (namespace/pod), integrates with billing APIs for AWS/Azure/GCP, and supports on-prem clusters with custom pricing
  • Strengths: Great for comprehensive, real-time visibility into cluster-level costs and multi-cloud billing standardization
  • Use case: Ideal for operations teams needing detailed cost breakdown in Kubernetes environments and aggregated cloud spend.

Install

create secret for clouds

kubectl create ns opencost
kubectl create secret generic cloud-costs --from-file=./k8s/cloud-integration.json --namespace opencost
helm repo add opencost https://opencost.github.io/opencost-helm-chart

helm upgrade -i opencost \
  --repo https://opencost.github.io/opencost-helm-chart opencost \
  --namespace opencost --create-namespace  \
  --version 1.43.2 \
  -f k8s/helm/values-kind.yaml

Pricing info for aws: https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/current/${node_region}/index.json

External Prometheus

install scrape configs

helm install prometheus --repo https://prometheus-community.github.io/helm-charts prometheus \
  --namespace prometheus-system --create-namespace \
  --set prometheus-pushgateway.enabled=false \
  --set alertmanager.enabled=false \
  -f https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/prometheus/extraScrapeConfigs.yaml
additionalScrapeConfigs: |
  - job_name: opencost
    honor_labels: true
    scrape_interval: 1m
    scrape_timeout: 10s
    metrics_path: /metrics
    scheme: http
    dns_sd_configs:
    - names:
      - opencost.opencost
      type: 'A'
      port: 9003

REFERENCE

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published