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
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[Istio] Canary Upgrade Istio by Operator. This way is very easy!!

Posted on September 9, 2021September 10, 2021 By nim No Comments on [Istio] Canary Upgrade Istio by Operator. This way is very easy!!

Để làm được bài này thì bạn cần có 1 cụm isito đã được cài trước đó và với version thấp hơn
Istio trước mình cài version 1.9.8 và đặt tên nó là primary.
Và giờ mình có nhu cầu nâng lên version 1.10.4
Tham khảo cách cài isito bằng operator ở bài viết bên dưới

https://notes.nimtechnology.com/2021/08/05/su-dung-istio-operator-va-istioctl-de-cai-dat-istio/
Safe and sound canary upgrade for your Istio control plane · Banzai Cloud
Hình đẹp nên xin về sài nhuôn

Giờ bạn thực hiện download package mới của isito version 1.10.4 và để lựa chọn version phù hơp thì vào link sau:

https://github.com/istio/istio/releases/

Dông dài quá rồi action thôi.

curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.10.4 TARGET_ARCH=x86_64 sh -
./istio-1.10.4/bin/istioctl profile dump default > /root/istio-operator-1.10.4-default.yaml

Thực hiện sửa file operator, điều quan trong ở đây bạn cần phải giữ file operator của isito primary nhé.
Chứ bạn mà dục mất thì chỉnh file cho canary hơi phiêu đấy

Màu đò là file primary cũ của mình

Trên file operator của canary thì mình sẽ đánh revision là canary nhé.

Thêm revision là canary để upgrade

Sau khi sửa xong thì mình gen file manifest để apply trên k8s

mkdir canary-upgrade
./istio-1.10.4/bin/istioctl manifest generate -f /root/istio-operator-1.10.4-default.yaml > /root/canary-upgrade/istio-canary-1.10.4.yaml

xong apply, Dưới đây là screen shot 2 thanh niên isito primary và isito canary .
Bạn sẽ thấy nó sài chung 1 số thứ he và có 1 số thứ ở 2 thằng sẽ riêng
Giờ chơi trò tìm điểm khác nhau của picture khá thú dị.

Đây là ảnh của isito-canary sau khi apply
Anh isito primary sau khi apply file canary

Lúc đâù thì workload đang sử dụng isito version 1.9.8

Để namespace nào inject sidecar của version mới thì bạn chạy câu lệnh như bên dưới he.

kubectl label namespace default istio-injection- istio.io/rev=canary --overwrite

Rồi bạn redeploy workload đó.

Giờ nó qua isito 1.10.4 rồi.

Giờ chán quá muốn trở về cũ thì sao.

kubectl label namespace default istio.io/rev- istio-injection=enabled --overwrite
>>>>Chiều các bạn được hết.

Có điển bạn cần chú ý ở “ValidatingWebhookConfiguration” của canary, thì nó vẫn đang trỏ vào isitod chứ không isito canary.

mà isitod của canary là tên trong hình cơ.

Xin để nguyên văn câu nói của Isito

Nó sẽ có 1 bước là bạn chuyển tất cả các workload qua canary he.

>>>> Dùng lệnh này để kiểm tra
./istio-1.10.4/bin/istioctl version

Sau khi đã chắc chắn là ko con workload bên 1.9.8 thì gõ lệnh, thôi lên argocd xoá đi.

delete isitod của isito primary nhé.
Xong đã xoá check thử sem có vấn đề gì ko?
log istiod-canary
Log của isito-ingressgateway cũng bung từa lưa.

isito-ingressgateway thì ko thấy nhảy log nữa

các app của mình đang chạy phà phà.

Giờ cấu hình file operator cho Primary từ file operator canary trước đó.

cp istio-operator-1.10.4-default.yaml istio-operator-primary-1.10.4-default.yaml

Loại bỏ revision canary đi như ảnh

>>>> gen file manifest và apply

./istio-1.10.4/bin/istioctl manifest generate -f /root/istio-operator-primary-1.10.4-default.yaml > /root/istio-1.10.4.yaml

Giờ apply và sem kết quả?

Đây là isito primary sau khi upgrade.
>>>>move các workload về primary

kubectl label namespace default istio.io/rev- istio-injection=enabled --overwrite

>>>> rồi kiểm tra lại
./istio-1.10.4/bin/istioctl version

Giờ bạn trờ qua bên canary và xoá các components có chữ canary.

Bạn xoá app isito-canary như hình, bạn mà chọn khác bay cum isito nhé

các Cứ từ xoá nhé. chứ production tay nhanh là mệt đấy.

Giờ qua primary xoá tiếp.

Bạn xoá component có dâú (x) nhé.
Thấy màu như hình là có vẻ ngon nhé

Giờ check log

Log isitod vẫn đẹp ha.
Log của isito-ingressgateway cũng ok he

Rồi giờ bạn check app của bạn đi qua istio có lỗi không? bằng các bài viết ở link dưới.

https://notes.nimtechnology.com/?s=Istio%2FRecheck+Envoy

Có video cho các bạn tham khảo:

https://www.youtube.com/watch?v=POlpwBdXfbE

https://istio.io/latest/docs/setup/upgrade/canary/

Isito-EnvoyFilter

Post navigation

Previous Post: [Spinnaker] Install Spinnaker on Kubernetes through Helm from OpsMx
Next Post: [Telegram] Hướng dẫn tạo 1 con bot nhắn tin trong telegram

More Related Articles

[Istio] OMG – Metric of an Istiod pod had 2 versions. Why??? Isito-EnvoyFilter
[kiali] Config authentication on Kiali. Isito-EnvoyFilter
[istio] Discover route TCP in Cluster Istio Isito-EnvoyFilter
[kiali/istio] Fix issue Configured: configmaps “istio” not found Isito-EnvoyFilter
[Istio/Recheck] Hướng dẫn kiểm tra các feature của cụm istio mới cài lên đã work ngon lành chưa? Isito-EnvoyFilter
[Istio/multi cluster] Install multi-cluster Istio with mode “Primary-Remote” for Kubernetes on Google Cloud Platform. Isito-EnvoyFilter

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

  • [Azure/Loadbalancer] Creating an internal load balancer on Azure Kubernetes Service (AKS). May 13, 2025
  • [Azure] The subscription is not registered to use namespace ‘Microsoft.ContainerService’ May 8, 2025
  • [Azure] Insufficient regional vcpu quota left May 8, 2025
  • [WordPress] How to add a Dynamic watermark on WordPress. May 6, 2025
  • [vnet/Azure] VNet provisioning via Terraform. April 28, 2025

Archives

  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • 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
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.