PageSourceSearch

https://opencost.io/assets/js/35f8d405.828817d4.js

js opencost.io collected 2026-10-02 03:21:59 UTC 16,529 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkweb_opencost=globalThis.webpackChunkweb_opencost||[]).push([[5580],{67(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Prometheus is a prerequisite for OpenCost installation. OpenCost requires Prometheus for scraping metrics and data storage. For the installation of Prometheus please use the following command:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"helm install prometheus --repo https://prometheus-community.github.io/helm-charts prometheus \\\n  --namespace prometheus-system --create-namespace \\\n  --set prometheus-pushgateway.enabled=false \\\n  --set alertmanager.enabled=false \\\n  -f https://raw.githubusercontent.com/opencost/opencost/develop/kubernetes/prometheus/extraScrapeConfigs.yaml\n"})}),"\n",(0,o.jsxs)(n.p,{children:["This will install Prometheus in the ",(0,o.jsx)(n.code,{children:"prometheus-system"})," namespace with default settings for use with OpenCost."]})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},550(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["Create the ",(0,o.jsx)(n.code,{children:"opencost"})," namespace for your installation:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"kubectl create namespace opencost\n"})}),"\n",(0,o.jsx)(n.p,{children:"Alternate namespaces may be used if necessary."})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},1227(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={a:"a",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"https://helm.sh/",children:"Helm"})," is the preferred installation method for OpenCost."]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},3160(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={a:"a",code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["You may check out the source for the ",(0,o.jsx)(n.a,{href:"https://github.com/opencost/opencost-helm-chart/",children:"OpenCost Helm Chart"})," or you may install the Helm chart directly to your Kubernetes cluster. Review the ",(0,o.jsx)(n.a,{href:"https://github.com/opencost/opencost-helm-chart/blob/main/charts/opencost/values.yaml",children:"values.yaml"})," for the settings available for customization. With your custom settings in the Helm values file ",(0,o.jsx)(n.code,{children:"local.yaml"}),", install OpenCost:"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"helm install opencost --repo https://opencost.github.io/opencost-helm-chart opencost \\\n  --namespace opencost -f local.yaml\n"})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},3997(e,n,t){t.r(n),t.d(n,{assets:()=>g,contentTitle:()=>x,default:()=>f,frontMatter:()=>m,metadata:()=>o,toc:()=>j});const o=JSON.parse('{"id":"configuration/ovh","title":"OVHcloud","description":"OpenCost may be installed on Kubernetes clusters running on OVHcloud, including Managed Kubernetes Service (MKS) clusters.","source":"@site/docs/configuration/ovh.mdx","sourceDirName":"configuration","slug":"/configuration/ovh","permalink":"/docs/configuration/ovh","draft":false,"unlisted":false,"editUrl":"https://github.com/opencost/opencost-website/tree/main/docs/configuration/ovh.mdx","tags":[],"version":"current","sidebarPosition":7,"frontMatter":{"sidebar_position":7,"title":"OVHcloud"},"sidebar":"docsSidebar","previous":{"title":"STACKIT","permalink":"/docs/configuration/stackit"},"next":{"title":"OpenCost Integrations","permalink":"/docs/integrations/"}}');var s=t(4848),r=t(8453),i=t(8323),l=t(1227),c=t(5072),a=t(3160),d=t(67),h=t(4244),p=t(550),u=t(8410);const m={sidebar_position:7,title:"OVHcloud"},x="Installing on OVHcloud",g={},j=[...h.RM,{value:"Install Prometheus",id:"install-prometheus",level:2},...d.RM,...i.RM,{value:"Create the OpenCost Namespace",id:"create-the-opencost-namespace",level:2},...p.RM,{value:"OVHcloud Configuration",id:"ovhcloud-configuration",level:2},{value:"Cost Allocation",id:"cost-allocation",level:3}
1,{value:"Environment Variables",id:"environment-variables",level:4},{value:"Monthly vs. Hourly Pricing",id:"monthly-vs-hourly-pricing",level:4},{value:"Persistent Volume Pricing",id:"persistent-volume-pricing",level:4},{value:"Custom Pricing",id:"custom-pricing",level:3},{value:"OVHcloud Cloud Costs",id:"ovhcloud-cloud-costs",level:2},{value:"Install OpenCost",id:"install-opencost",level:2},...l.RM,{value:"Using the OpenCost Helm Chart",id:"using-the-opencost-helm-chart",level:3},...a.RM,{value:"Updating OpenCost via Helm",id:"updating-opencost-via-helm",level:3},...u.RM,{value:"Installing with the OpenCost Manifest",id:"installing-with-the-opencost-manifest",level:3},...c.RM];function v(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"installing-on-ovhcloud",children:"Installing on OVHcloud"})}),"\n",(0,s.jsx)(n.p,{children:"OpenCost may be installed on Kubernetes clusters running on OVHcloud, including Managed Kubernetes Service (MKS) clusters."}),"\n",(0,s.jsx)(h.Ay,{}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["OVHcloud support is available starting from the next release after 1.119.2. If you need it before the official release, you may use the ",(0,s.jsx)(n.code,{children:"develop-latest"})," image tag."]})}),"\n",(0,s.jsx)(n.h2,{id:"install-prometheus",children:"Install Prometheus"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsx)(i.Ay,{}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["If you are using kube-prometheus-stack (Prometheus Operator), you can skip the ",(0,s.jsx)(n.code,{children:"extraScrapeConfigs"})," and enable the ServiceMonitor in the OpenCost Helm chart instead:"]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"opencost:\n  metrics:\n    serviceMonitor:\n      enabled: true\n      additionalLabels:\n        release: <your-prometheus-stack-release-name>\n"})})]}),"\n",(0,s.jsx)(n.h2,{id:"create-the-opencost-namespace",children:"Create the OpenCost Namespace"}),"\n",(0,s.jsx)(p.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"ovhcloud-configuration",children:"OVHcloud Configuration"}),"\n",(0,s.jsx)(n.h3,{id:"cost-allocation",children:"Cost Allocation"}),"\n",(0,s.jsxs)(n.p,{children:["OpenCost will automatically detect OVHcloud as the cloud service provider (CSP) by reading node labels. When the label ",(0,s.jsx)(n.code,{children:"node.k8s.ovh/type"})," is present, OpenCost identifies the cluster as running on OVHcloud."]}),"\n",(0,s.jsxs)(n.p,{children:["Once detected, OpenCost retrieves real-time pricing data from the ",(0,s.jsx)(n.a,{href:"https://eu.api.ovh.com/v1/order/catalog/public/cloud?ovhSubsidiary=FR",children:"OVH Public Cloud Catalog API"}),". This includes:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Instance pricing"}),": hourly and monthly rates for all Public Cloud flavors (general purpose, CPU, RAM, GPU, discovery, IOPS)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Volume pricing"}),": per-GB/hour rates for all Cinder volume types (classic, high-speed, high-speed-gen2)"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"No API key is required to retrieve the public pricing data."}),"\n",(0,s.jsx)(n.h4,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,s.jsx)(n.p,{children:"The following optional environment variables may be used to customize OVHcloud pricing behavior:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Default"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OVH_SUBSIDIARY"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"FR"})}),(0,s.jsxs)(n.td,{children:["OVH subsidiary for catalog pricing (e.g., ",(0,s.jsx)(n.code,{children:"FR"}),", ",(0,s.jsx)(n.code,{children:"DE"}),", ",(0,s.jsx)(n.code,{children:"US"}),", ",(0,s.jsx)(n.code,{children:"GB"}),"). Determines the currency and regional pricing."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OVH_MONTHLY_NODEPOOLS"})}),(0,s.jsx)(n.td,{children:"(empty)"}),(0,s.jsx)(n.td,{children:"Comma-separated list of nodepool names that use monthly billing instead of hourly consumption pricing."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"REGION_OVERRIDE_LIST"})}),(0,s.jsx)(n.td,{children:"(empty)"}),(0,s.jsx)(n.td,{children:"Comma-separated list of OVH regions to query. Overrides the built-in region list if set."})]})]})]}),"\n",(0,s.jsx)(n.h4,{id:"monthly-vs-hourly-pricing",children:"Monthly vs. Hourly Pricing"}),"\n",(0,s.jsxs)(n.p,{children:["OVHcloud offers both hourly (consumption) and monthly billing for Public Cloud instances. By default, OpenCost uses hourly pricing for all nodes. If some of your nodepools use monthly billing, set the ",(0,s.jsx)(n.code,{children:"OVH_MONTHLY_NODEPOOLS"})," environment variable:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'opencost:\n  exporter:\n    extraEnv:\n      OVH_MONTHLY_NODEPOOLS: "my-monthly-pool,another-monthly-pool"\n'})}),"\n",(0,s.jsx)(n.p,{children:"Monthly prices are converted to an equivalent hourly rate (monthly price / 730 hours) for consistent cost allocation."}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, you can override billing mode per node using the ",(0,s.jsx)(n.code,{children:"ovh.opencost.io/billing"})," label with a value of ",(0,s.jsx)(n.code,{children:"monthly"})," or ",(0,s.jsx)(n.code,{children:"hourly"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:"kubectl label node 
1<node-name> ovh.opencost.io/billing=monthly\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This label takes precedence over the ",(0,s.jsx)(n.code,{children:"OVH_MONTHLY_NODEPOOLS"})," environment variable for the labeled node."]}),"\n",(0,s.jsx)(n.h4,{id:"persistent-volume-pricing",children:"Persistent Volume Pricing"}),"\n",(0,s.jsx)(n.p,{children:"OpenCost automatically prices Persistent Volumes backed by OVHcloud Cinder CSI. The volume type is resolved from:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"A built-in mapping of StorageClass names to OVH volume types"}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.code,{children:"type"})," parameter in the StorageClass specification (fallback)"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Supported volume types include ",(0,s.jsx)(n.code,{children:"classic"}),", ",(0,s.jsx)(n.code,{children:"high-speed"}),", and ",(0,s.jsx)(n.code,{children:"high-speed-gen2"})," (plus their ",(0,s.jsx)(n.code,{children:"-luks"})," encrypted variants)."]}),"\n",(0,s.jsx)(n.h3,{id:"custom-pricing",children:"Custom Pricing"}),"\n",(0,s.jsx)(n.p,{children:"If you need to override the default OVHcloud pricing retrieved from the catalog API, you may provide custom pricing in your Helm values:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'opencost:\n  customPricing:\n    enabled: true\n    provider: ovh\n    costModel:\n      description: Custom OVH pricing overrides\n      CPU: "0.03405"\n      RAM: "0.009729"\n      GPU: "1.80"\n      storage: "0.000119"\n'})}),"\n",(0,s.jsx)(n.h2,{id:"ovhcloud-cloud-costs",children:"OVHcloud Cloud Costs"}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"Cloud Costs are not currently supported for OVHcloud. Support is planned for a future release."})}),"\n",(0,s.jsx)(n.h2,{id:"install-opencost",children:"Install OpenCost"}),"\n",(0,s.jsx)(l.Ay,{}),"\n",(0,s.jsx)(n.h3,{id:"using-the-opencost-helm-chart",children:"Using the OpenCost Helm Chart"}),"\n",(0,s.jsx)(a.Ay,{}),"\n",(0,s.jsxs)(n.p,{children:["To enable the OVHcloud provider explicitly (e.g., when running outside an MKS cluster), set the ",(0,s.jsx)(n.code,{children:"CLOUD_PROVIDER"})," environment variable:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'opencost:\n  exporter:\n    extraEnv:\n      CLOUD_PROVIDER: "OVH"\n'})}),"\n",(0,s.jsx)(n.h3,{id:"updating-opencost-via-helm",children:"Updating OpenCost via Helm"}),"\n",(0,s.jsx)(u.Ay,{}),"\n",(0,s.jsx)(n.h3,{id:"installing-with-the-opencost-manifest",children:"Installing with the OpenCost Manifest"}),"\n",(0,s.jsx)(n.p,{children:"Installing from the OpenCost manifest is supported on OVHcloud."}),"\n",(0,s.jsx)(c.Ay,{})]})}function f(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(v,{...e})}):v(e)}},4244(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={p:"p",...(0,s.R)(),...e.components};return(0,o.jsx)(n.p,{children:"You will need to install Prometheus, create your OpenCost namespace, configure your cluster pricing and cloud costs, and then install OpenCost."})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},5072(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"OpenCost standalone Kubernetes manifest installation is no longer supported. Use the OpenCost Helm chart for installation and upgrades:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"helm repo add opencost https://opencost.github.io/opencost-helm-chart\nhelm repo update\nhelm install opencost opencost/opencost --namespace opencost --create-namespace\n"})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8323(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={a:"a",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["If you wish to use a different Prometheus installation or work with another compatible technology, please refer to the ",(0,o.jsx)(n.a,{href:"../installation/prometheus",children:"Prometheus"})," installation page."]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8410(e,n,t){t.d(n,{Ay:()=>l,RM:()=>r});var o=t(4848),s=t(8453);const r=[];function i(e){const n={code:"code",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"Upgrading the Helm chart version or updating settings may be done with the following:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"helm upgrade opencost --repo https://opencost.github.io/opencost-helm-chart opencost \\\n  --namespace opencost -f local.yaml\n"})})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},8453(e,n,t){t.d(n,{R:()=>i,x:()=>l});var o=t(6540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.