|
| 1 | +--- |
| 2 | +sidebar_position: 1 |
| 3 | +title: Linode |
| 4 | +--- |
| 5 | +import CloudCosts from './_cloud_costs.mdx'; |
| 6 | +import CloudCostsInfo from './_cloud_costs_info.mdx'; |
| 7 | +import CustomPrometheus from './_custom_prometheus.mdx'; |
| 8 | +import Helm from './_helm.mdx'; |
| 9 | +import InstallCloudCosts from './_install_cloud_costs.mdx'; |
| 10 | +import InstallManifest from './_install_manifest.mdx'; |
| 11 | +import InstallOpenCost from './_install_opencost.mdx'; |
| 12 | +import InstallPrometheus from './_install_prometheus.mdx'; |
| 13 | +import Installing from './_installing.mdx'; |
| 14 | +import Namespace from './_namespace.mdx'; |
| 15 | +import UpdateOpenCost from './_update_opencost.mdx'; |
| 16 | + |
| 17 | +# Installing on Linode |
| 18 | + |
| 19 | +OpenCost may be installed on Kubernetes clusters running on Linode Kubernetes Service (LKS). |
| 20 | +<Installing/> |
| 21 | + |
| 22 | +## Install Prometheus |
| 23 | + |
| 24 | +<InstallPrometheus/> |
| 25 | +<CustomPrometheus/> |
| 26 | + |
| 27 | +## Create the OpenCost Namespace |
| 28 | + |
| 29 | +<Namespace/> |
| 30 | + |
| 31 | +## Linode Configuration |
| 32 | + |
| 33 | +### Cost Allocation |
| 34 | + |
| 35 | +OpenCost will automatically read the node information `node.spec.providerID` to determine the cloud service provider (CSP) in use. If it detects the CSP is LKE, it will attempt to pull the Linode on-demand pricing with no further configuration required. |
| 36 | + |
| 37 | +### Custom Pricing |
| 38 | + |
| 39 | +```yaml |
| 40 | +opencost: |
| 41 | + customPricing: |
| 42 | + enabled: true |
| 43 | + configmapName: pricing-configs |
| 44 | + provider: linode |
| 45 | + costModel: |
| 46 | + description: Modified Linode prices |
| 47 | + linodeTokenSecret: Modified token secret namespaced name |
| 48 | + CPU: 0.0 |
| 49 | + RAM: 0.0 |
| 50 | + storage: 0.00015 |
| 51 | + GPU: 0.0 |
| 52 | + spotCPU: 0.0 |
| 53 | + spotRAM: 0.0 |
| 54 | + zoneNetworkEgress: 0.0 |
| 55 | + regionNetworkEgress: 0.0 |
| 56 | + internetNetworkEgress: 0.0 |
| 57 | + defaultLBPrice: 0.15 |
| 58 | + controlPlaneCosts: 0.0 |
| 59 | + HaControlPlaneCosts: 0.9 |
| 60 | + |
| 61 | + exporter: |
| 62 | + extraEnv: |
| 63 | + KUBECOST_NAMESPACE: 'opencost' |
| 64 | +``` |
| 65 | +
|
| 66 | +#### Security for Linode integration |
| 67 | +
|
| 68 | +OpenCost uses the [Linode SDK for Go](https://github.com/linode/linodego) to pull price data. |
| 69 | +
|
| 70 | +Linode integration works out of the box, uses the token deployed by default `kube-system/linode`. Sometimes it makes sense to change or rotate the token. |
| 71 | + |
| 72 | +First create [Linode API token](https://cloud.linode.com/profile/tokens) with Read-Only Kubernetes access. |
| 73 | + |
| 74 | +Create your own secret. |
| 75 | + |
| 76 | +```bash |
| 77 | +kubectl apply -f - <<EOF |
| 78 | +apiVersion: v1 |
| 79 | +kind: Secret |
| 80 | +metadata: |
| 81 | + name: linode |
| 82 | + namespace: opencost |
| 83 | +type: Opaque |
| 84 | +data: |
| 85 | + token: $(echo -n $LINODE_TOKEN | base64) |
| 86 | +EOF |
| 87 | +``` |
| 88 | + |
| 89 | +Configure custom pricing. |
| 90 | + |
| 91 | +```yaml |
| 92 | +opencost: |
| 93 | + customPricing: |
| 94 | + enabled: true |
| 95 | + configmapName: pricing-configs |
| 96 | + provider: linode |
| 97 | + costModel: |
| 98 | + linodeTokenSecret: opencost/linode |
| 99 | +``` |
| 100 | + |
| 101 | +> Alternatively you can overwrite secret via Helm value `opencost.exporter.linode.tokenSecret`. |
| 102 | + |
| 103 | +## Linode Cloud Costs |
| 104 | + |
| 105 | +<!-- CloudCostsInfo/ --> |
| 106 | + |
| 107 | +Cloud Cost integration isn't supported at the moment. |
| 108 | + |
| 109 | +<!-- InstallCloudCosts/ --> |
| 110 | +<!-- CloudCosts/ --> |
| 111 | + |
| 112 | +## Install OpenCost |
| 113 | + |
| 114 | +<Helm/> |
| 115 | + |
| 116 | +### Using the OpenCost Helm Chart |
| 117 | + |
| 118 | +<InstallOpenCost/> |
| 119 | + |
| 120 | +### Updating OpenCost via Helm |
| 121 | + |
| 122 | +<UpdateOpenCost/> |
| 123 | + |
| 124 | +### Installing with the OpenCost Manifest |
| 125 | + |
| 126 | +Installing from the OpenCost manifest is supported on Linode. |
| 127 | + |
| 128 | +<InstallManifest/> |
0 commit comments