Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
    • Helm Chart
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log & Monitor
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
  • Toggle search form

[Kubecost] Đánh giá chi phí và hiệu quả sử dụng của hệ thống Kubernetes của bạn.

Posted on June 24, 2021December 27, 2022 By nim No Comments on [Kubecost] Đánh giá chi phí và hiệu quả sử dụng của hệ thống Kubernetes của bạn.

Contents

  • 1) Look into and install Kubecost on Kubernetes
  • 2) Right-size your container requests in Kubecost
  • 3) Setup multi-cluster on kubecost

1) Look into and install Kubecost on Kubernetes

Links hướng dẫn cài đặt: https://www.kubecost.com/install.html#show-instructions

##Helm 3 nhé###
kubectl create namespace kubecost
helm repo add kubecost https://kubecost.github.io/cost-analyzer/
helm install kubecost kubecost/cost-analyzer --namespace kubecost --set kubecostToken="bXIubmltOTRAZ21haWwuY29txm343yadf98"

Links API: http://docs.kubecost.com/apis

Bạn có thể tự lấy thông tin cost và efficiency nhúng vào hệ thống quản lý k8s
2 thanh niên này cần pvc
tolerations:
  - key: "node"
    operator: "Equal"
    value: "storage-ssd"
    effect: "NoSchedule"
nodeSelector:
  node: "storage-ssd"
Anh Em edit trong live manifest nhé.
tìm chưa tìm ra trong helm value chỗ nào.

Bạn có thể tuỷ chỉnh storage cho phù hợp. update sat 6 nov 2021

kubecostToken: "bXIubmltOTRAZ21haWwuY29txm343yadf98"
nodeSelector:
  node: "storage-hdd"
persistentVolume:
  storageClass: "longhorn-normal"

Nếu mà Cluster kube của bạn đã cài prometheus rồi và có sẵn node-exporter thì bạn bỏ node-exporter của kubecost ra nhé

Trong yaml của kubecost set node exporter = false nhé

Đây là chấm điểm của kubecost về cluster k8s của Nimtechnology

Trong vô số tính năng hưu ích thì mình chỉ cho bạn 1 thứ rất hay

Nó gợi ý cho bạn nên request ram/cpu cho workload như nào là tiết kiệm và hiểu quả
Giải thích chỗ 65% bằng công thức

update thu 7 Oct 2021
Cái số recommendation này được dựa vào data của pod có usage cao nhất

Để hình cho dễ hiểu.

Bạn có thể tham khảo thêm các tool khác:
https://medium.ninja/empathyco/cloud-finops-part-4-kubernetes-cost-report-b4964be02dc3

2) Right-size your container requests in Kubecost

Đầu tiên bạn sẽ không biết là pod của bạn đang sử dụng bao nhiêu RAM, CPU và liệu chúng ta đã hiểu quả chưa?

Chúng ra tìm hiểu cách điều chỉnh ram và cpu request sao cho hiệu quả.

CLick để filter theo namespace, deployment thì bạn chọn controller,…

3) Setup multi-cluster on kubecost

https://github.com/kubecost/docs/blob/main/multi-cluster.md
https://github.com/kubecost/cost-analyzer-helm-chart/blob/master/cost-analyzer/values.yaml
https://github.com/kubecost/docs/blob/master/ingress-examples.md

Kubernetes & Container

Post navigation

Previous Post: [NFS] Hướng dẫn cài đặt share storage NFS trên centos7
Next Post: [Kustomize] Tìm hiểu về Kustomize tool cho k8s, có thể dùng cho ArgoCD.

More Related Articles

[K8s] Hướng dẫn sử dụng kubectl trên mấy local kết nối đến k8s master Kubernetes
[Kubernetes] Gateway API – Ingress And Service Mesh Spec Replacement? Kubernetes & Container
[Kubernetes] Lesson7: k8s Easy – Pod Kubernetes & Container
[Harbor] Cài đặt Private Dockerhub – Harbor trên k8s bằng helm – repo Binami Harbor
[Harbor] Install harbor(private docker hub) On k8s through helm and repo goharbor Harbor
[AWS] Creating EKS windows on AWS and Running windows pods AWS - Amazon Web Service

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [Smartctl] Instruction check the health disk of Raspberry. January 16, 2023
  • [kubectl/Argocd] How to create a kubectl config file for serviceaccount or from the cluster secret of Argocd January 12, 2023
  • [Helm/Github] Create a public Helm chart repository with GitHub Pages January 8, 2023
  • [AWS] How to increase the disk size of a Windows EC2 machine? January 4, 2023
  • [Redis] ElastiCache-Redis Cross-Region Replication|Global DataStore January 3, 2023

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • Golang
    • Jquery & JavaScript
    • Laravel
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kubernetes
      • Ingress
    • Longhorn – Storage
    • Vault
    • VictoriaMetrics
  • Log & Monitor
    • ELK
      • Kibana
      • Logstash
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2023 NimTechnology.