OpenShift Service Mesh 3.0 is a Technology Preview feature only
Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. This documentation is a work in progress and might not be complete or fully tested.3.2. クラスター全体のデプロイメントモデルを使用して Red Hat OpenShift Service Mesh 2.6 と Red Hat OpenShift Service Mesh 3 を実行する
クラスター全体のデプロイメントモデルで Red Hat OpenShift Service Mesh 2.6 から移行する場合は、互いに干渉することなく、1 つのクラスター内で OpenShift Service Mesh 2.6 と OpenShift Service Mesh 3.0 を並行して実行できます。
OpenShift Service Mesh 2.6 では、spec.mode
の ServiceMeshControlPlane
からデプロイメントモデルを確認できます。
ServiceMeshControlPlane
yaml の例
apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic spec: mode: ClusterWide
OpenShift Service Mesh 2.6 クラスター全体のデプロイメントモデルを使用するときに OpenShift Service Mesh 3.0 との競合を防ぐには、ServiceMeshControlPlane
リソースを設定して、namespace を (SMProduct) 2.6 に属するものだけに制限する必要があります。
前提条件
- OpenShift Container Platform 4.14 以降を実行している。
OpenShift Service Mesh 2.6 を実行している。
重要OpenShift Service Mesh 2.6 を実行していない場合は、この手順を実行する前に 2.6 にアップグレードする必要があります。OpenShift Service Mesh バージョン 2.6 にアップグレードするには、Service Mesh 2.x のアップグレード を参照してください。
手順
discoverySelectors
を設定し、OpenShift Service Mesh 2.6ServiceMeshControlPlane
カスタムリソース (CR) でパイロットコンテナーのENABLE_ENHANCED_RESOURCE_SCOPING
環境変数をtrue
に設定します。ServiceMeshControlPlane
CR の例apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic namespace: istio-system spec: version: v2.6 mode: ClusterWide meshConfig: discoverySelectors: - matchExpressions: - key: maistra.io/member-of operator: Exists runtime: components: pilot: container: env: ENABLE_ENHANCED_RESOURCE_SCOPING: 'true'
- OpenShift Service Mesh 3 Operator をインストールします。
-
istio-cni
namespace にIstioCNI
リソースを作成します。 OpenShift Service Mesh 2.6 の
ServiceMeshControlPlane
リソースで使用される namespace とは異なる namespace にIstio
リソースを作成します。この例では、istio-system3
namespace を使用します。istio-system3
を使用したIstio
リソースの例kind: Istio apiVersion: sailoperator.io/v1alpha1 metadata: name: ossm3 1 spec: namespace: istio-system3 2 values: meshConfig: discoverySelectors: 3 - matchExpressions: - key: maistra.io/member-of operator: DoesNotExist updateStrategy: type: InPlace version: v1.23.0
次のコマンドを実行して、ワークロードをデプロイし、namespace に
istio.io/rev=ossm3
ラベルを付けます。$ oc label namespace <namespace-name> istio.io/rev=ossm3
注記OpenShift Service Mesh 2.6 の
ServiceMeshControlPlane
リソースのServiceMeshMemberRoll
のspec.memberSelectors
を変更した場合は、OpenShift Service Mesh 3.0 ワークロード namespace にistio-injection=enabled
ラベルを使用します。次のコマンドを実行して、アプリケーションワークロードがそれぞれのコントロールプレーンによって管理されていることを確認します。
$ istioctl ps -i istio-system
サンプル出力
istio-system
$ istioctl ps -i istio-system NAME CLUSTER CDS LDS EDS RDS ECDS ISTIOD VERSION details-v1-7f46897b-88x4l.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 mongodb-v1-6cf7dc9885-7nlmq.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 mysqldb-v1-7c4c44b9b4-22b57.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 productpage-v1-6f9c6589cb-l6rvg.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 ratings-v1-559b64556-f6b4l.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 ratings-v2-8ddc4d65c-bztrg.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 ratings-v2-mysql-cbc957476-m5j7w.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 reviews-v1-847fb7c54d-7dwt7.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 reviews-v2-5c7ff5b77b-5bpc4.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8 reviews-v3-5c5d764c9b-mk8vn.info Kubernetes SYNCED SYNCED SYNCED SYNCED NOT SENT istiod-install-istio-system-bd58bdcd5-2htkf 1.20.8
サンプル出力
istio-system3
$ istioctl ps -i istio-system3 NAME CLUSTER CDS LDS EDS RDS ECDS ISTIOD VERSION details-v1-57f6466bdc-5krth.info2 Kubernetes SYNCED (2m40s) SYNCED (2m40s) SYNCED (2m34s) SYNCED (2m40s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0 productpage-v1-5b84ccdddf-f8d9t.info2 Kubernetes SYNCED (2m39s) SYNCED (2m39s) SYNCED (2m34s) SYNCED (2m39s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0 ratings-v1-fb764cb99-kx2dr.info2 Kubernetes SYNCED (2m40s) SYNCED (2m40s) SYNCED (2m34s) SYNCED (2m40s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0 reviews-v1-8bd5549cf-xqqmd.info2 Kubernetes SYNCED (2m40s) SYNCED (2m40s) SYNCED (2m34s) SYNCED (2m40s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0 reviews-v2-7f7cc8bf5c-5rvln.info2 Kubernetes SYNCED (2m40s) SYNCED (2m40s) SYNCED (2m34s) SYNCED (2m40s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0 reviews-v3-84f674b88c-ftcqg.info2 Kubernetes SYNCED (2m40s) SYNCED (2m40s) SYNCED (2m34s) SYNCED (2m40s) IGNORED istiod-ossm3-5b46b6b8cb-gbjx6 1.23.0