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
  • Coding
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
    • Golang
    • Laravel
    • Jquery & JavaScript
    • Git
    • Selenium
  • Log & Monitor
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
  • Toggle search form

[Longhorn/Storage] Install Longhorn on Kubernetes through helm and config Taints and Tolerations

Posted on August 24, 2021November 9, 2021 By nim No Comments on [Longhorn/Storage] Install Longhorn on Kubernetes through helm and config Taints and Tolerations

Contents

  • 1) Intall Longhorn by helm
  • 2) Overview and material references
  • 3) Practice – update Sat 23 Oct 2021

1) Intall Longhorn by helm

https://longhorn.io/docs/1.1.2/deploy/install/install-with-helm/

helm repo add longhorn https://charts.longhorn.io
kubectl create namespace longhorn-system
helm install longhorn longhorn/longhorn --namespace longhorn-system

Nếu bạn có cluster có nhưng node chạy SSD và bạn muốn longhorn được deploy trên đó thì làm theo mình

Taints and Tolerations Usage with Node Selector in Kubernetes Scheduling
kubectl label nodes k8s-worker-storage1 node=storage-ssd
kubectl taint node k8s-worker-storage1 node=storage-ssd:NoSchedule

Tham khảo bài viết trên để hiều tains and tolerations node

sử value này cho helm

longhornManager:
  tolerations:
    - key: "node"
      operator: "Equal"
      value: "storage-ssd"
      effect: "NoSchedule"
  nodeSelector:
    node: "storage-ssd"

longhornDriver:
  tolerations:
    - key: "node"
      operator: "Equal"
      value: "storage-ssd"
      effect: "NoSchedule"
  nodeSelector:
    node: "storage-ssd"

longhornUI:
  tolerations:
    - key: "node"
      operator: "Equal"
      value: "storage-ssd"
      effect: "NoSchedule"
  nodeSelector:
    node: "storage-ssd"

2) Overview and material references

sau khi deploy xong thì kiểm tra

Ok đã đúng node mong muốn

Tiện mà mình rút ra:

  • Quản lý, tạo, xoá PV và PVC rất tiện và dễ thực hiện.
  • Dynamically provision persistent volumes in Kubernetes: rất tiện cho anh/em khi cài app thông qua helm, không phải suy nghĩ nên tạo pvc và pv như thế nào.

Có video hướng dẫn luôn nhé! mọi người coi để thấy cách control longhorn như thế nào

3) Practice – update Sat 23 Oct 2021

Như trước thì mình sẽ cần tạo pv, rồi tạo pvc
Giờ nhẹ nhàng hơn bạn chỉ apply pvc với storageClass là longhorn

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  labels:
    name: jenkins-permanent
  name: jenkins-permanent
spec:
  storageClassName: longhorn
  accessModes:
    - "ReadWriteOnce"
  resources:
    requests:
      storage: "8Gi"

4) Upgrade longhorn

Kubernetes & Container, Longhorn - Storage

Post navigation

Previous Post: [Keycloak/OAuth2] Install Keycloak by helm on Kubernetes
Next Post: [issue/alpine] docker 20.10.2 -> golang:1-alpine3.14 error: make: go: Operation not permitted

More Related Articles

[Istio-Multi Cluster] Tutorial is very detailed to install Primary-Remote on different networks Isito-EnvoyFilter
[Udemy] Download khóa học Udemy giá rẻ chỉ với 55k/khóa Kubernetes & Container
[Kubernetes] How to delete POD is Terminating and very stubborn Kubernetes
[Docker] Comand Docker hay quên!! Docker
[Minio] Install MinIO on Kubernetes through minio-operator Kubernetes & Container
[Keycloak/OAuth2] Install Keycloak by helm on Kubernetes Kubernetes & Container

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

  • Protected: My Assignment  June 24, 2022
  • [Spinnaker] Spinnaker writes too many logs – Reduce spinnaker log level June 22, 2022
  • [Jenkins] Jobs will be created automatically by Jenkins Job Builder June 20, 2022
  • [Postgresql] Install postgresql client and trying a few command postgresql. June 20, 2022
  • [Mount/Nextcloud] How do you mount a hard disk that was used windows into Linux. June 19, 2022

Archives

  • 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
    • Jenkins
    • Spinnaker
  • Coding
    • Git
    • Golang
    • Jquery & JavaScript
    • Laravel
    • 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 © 2022 NimTechnology.