Install Kubecost

Install Kubecost
Photo by nbtrisna In the quiet of the station, signs whisper directions for journeys yet to unfold.

Kubecost merupakan tools yang digunakan untuk tracing, monitoring biaya dari sebuah on-premises kubernetes cluster.

Installasi

Refrensi : https://www.kubecost.com/install#show-instructions

Installasi kubecost menggunakan helm, disini ketika melakukan installasi kubecost, secara otomatis akan terinstall prometheus dan grafana.

  1. Get helm values
helm repo add kubecost https://kubecost.github.io/cost-analyzer/
helm show values kubecost kubecost/cost-analyzer -n kubecost > values.yaml
  1. Sesuaikan values

Disini saya menyesuaikan mata uang yang digunakan dalam dashboard Kubecost

kubecostProductConfigs:
    currencyCode: IDR

Untuk service yang sebelumnya ClusterIP, saya set ke NodePort agar dapat mudah diakses.

service:
  type: NodePort 
  nodePort: 30003
  1. Installasi
helm upgrade --install kubecost \
  --repo https://kubecost.github.io/cost-analyzer/ cost-analyzer \
  --namespace kubecost --create-namespace -f values.yaml

Result, pastikan pod running semua.

Pasted image 20241108195027

Url dapat diakses dengan nodeport :30003

Pasted image 20241108195822