Tweet
Logo
    Istio を ArgoCD で運用する
    Istio を ArgoCD で運用する

    Istio を ArgoCD で運用する

    • 追記
    • はじめに
    • Istio の運用に関わる要件
    • Istio 公式に記載されているインストール方法
    • ArgoCD で Istio Operator を使う
    • Operator のバージョンの確認

    追記

    istio operator は 1.12 系から公式には推奨されない方式になってしまいました

    Use of the operator for new Istio installations is discouraged in favor of the Istioctl  and Helm  installation methods. While the operator will continue to be supported, new feature requests will not be prioritized.
    Istio Operator Install

    Use of the operator for new Istio installations is discouraged in favor of the Istioctl and Helm installation methods. While the operator will continue to be supported, new feature requests will not be prioritized. Instead of manually installing, upgrading, and uninstalling Istio in a production environment, you can instead let the Istio operator manage the installation for you.

    istio.io

    この記事は operator install を前提としていますので、参考にされる方は運用を充分に検討してください

    はじめに

    DROBE では ArgoCD で gitops 管理しているクラスターで istio を運用しています

    具体的にどうやって管理しているかを書いていきます

    Istio の運用に関わる要件

    運用に関わる要件としては以下を考えました

    • GitOps と相性が良い事
      • 全てのリソースをファイルとして定義可能で、コミットできる事
    • Istio 自体のバージョンの更新を GitOps の文脈で行える事
      • 管理されているファイルを修正してコミットする事で istio のバージョンが更新出来る事

    Istio は頻繁にバージョンが更新されており、バージョンアップに無理なくついていける事は重要だと考えています

    Istio 1.0: 2018/07/31
    Istio 1.1: 2019/03/19
    Istio 1.2: 2019/06/18
    Istio 1.3: 2019/09/12
    Istio 1.4: 2019/11/14
    Istio 1.5: 2020/03/05
    Istio 1.6: 2020/05/21
    Istio 1.7: 2020/08/21
    Istio 1.8: 2020/11/19
    Istio 1.9: 2021/02/09
    Istio の minor version のリリース日 (https://istio.io/latest/news/releases/)

    Istio 公式に記載されているインストール方法

    istio 公式によると istio のインストール方法は主に 3 つあります

    https://istio.io/latest/docs/setup/install/

    1. istioctl を使う

    https://istio.io/latest/docs/setup/install/istioctl/

    2. istio operator を使う

    https://istio.io/latest/docs/setup/install/operator/

    3. helm を使う

    https://istio.io/latest/docs/setup/install/helm/

    この中で DROBE では 2. istio operator を採用しています

    理由は以下です

    • 1. istioctl は cli ツールからコマンドを叩く前提なので、gitops と相性が悪い
    • 3. helm は 2021年4月現在 alpha 機能である

    ArgoCD で Istio Operator を使う

    DROBE では ArgoCD と Istio Operator を使ってシステム管理をするために、以下のような形で管理しています

    1. helm コマンドを使って istio operator 自体の manifest をファイルにする
    2. 1 で作った manifest を ArgoCD 管理下のレポジトリーにコミットする
    3. ArgoCD で Sync する

    1 については以下の方法で行う事が可能です

    まずはインストールしたい istio リリースのバージョンをダウンロードします

    $ curl -L https://istio.io/downloadIstio | ISTIO_VERSION=1.9.3 TARGET_ARCH=x86_64 sh -

    ISTIO_VERSION=1.9.3 の部分はインストールしたいバージョンを指定してください

    公式の手順はこちらです https://istio.io/latest/docs/setup/getting-started/#download

    つぎに helm コマンドを使って operator の manifest を file に落とします

    helm template istio-1.9.3/manifests/charts/istio-operator/ \
      --set hub=docker.io/istio \
      --set tag=1.9.3 \
      --set operatorNamespace=istio-operator \
      --set watchedNamespaces=istio-system \
      --set enableCRDTemplates=true \
      > operator.yaml

    istio-1.9.3/manifests/charts/istio-operator/ は前のステップで落とした istio リリースのフォルダを指定しています

    tag でインストールしたいバージョンを指定します

    作られたoperator.yaml を apply すると namespace と同時に operator が作られますので、 operator.yaml を ArgoCD 管理下の repository に commit して、ArgoCD から Sync します

    Operator のバージョンの確認

    作られた operator は下記のコマンドで確認が可能です

    $ kubectl get po -n istio-operator

    また、operator が意図したバージョンのものかを下記コマンドで確認するできます

    https://istio.io/latest/docs/setup/install/operator/#in-place-upgrade

    kubectl get pods --namespace istio-operator \
      -o=jsonpath='{range .items[*]}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{"\n"}{end}'
    © 2025 DROBE All rights reserved.