從 IstioOperator 遷移
受管理控制層不直接支援 IstioOperator,無法進行自訂。從 Cloud Service Mesh 遷移至代管控制層時,需要手動從 IstioOperator 轉換。這項工具可自動執行該程序,減少摩擦。
關於遷移工具
遷移工具會以非破壞性方式評估提供的 IstioOperator 檔案,以執行下列操作:
- 檢查是否有相容性問題。
- 將相容的
IstioOperator設定轉換為受管理控制平面支援的設定,並將新設定輸出至檔案。 - 輸出有關設定值的警告,這些設定值會與受管理控制層所需的預設值衝突。
- 建議如何使用產生的檔案。
這個工具不會檢查叢集資料或設定,也不會變更叢集設定。您必須分別套用所有生成的檔案。
使用遷移工具前,請先查看代管控制層支援的功能限制,確認代管控制層支援您的 Cloud Service Mesh 安裝作業。
使用遷移工具
遷移工具是 asmcli 指令碼的一部分。如要使用這項工具,請務必下載指令碼。
執行遷移工具:
asmcli experimental mcp-migrate-check -f path/to/istiooperator.yaml
請注意工具輸出的檔案清單,特別是
asm/*meshconfig.yaml和asm/gateways*。檢查設定警告。
查看輸出內容,並按照指示遷移。
不支援的 MeshConfig 欄位
代管控制層會覆寫 MeshConfig 中的下列欄位。
trustDomaintrustDomainAliasesconfigSourcesdefaultConfig.proxyMetadata- 這些特定欄位會遭到覆寫。您可以新增欄位:XDS_ROOT_CACA_ROOT_CAOUTPUT_CERTSXDS_AUTH_PROVIDERPROXY_CONFIG_XDS_AGENT
defaultConfig.meshIddefaultConfig.discoveryAddress
輸出範例
$ asmcli experimental mcp-migrate-check -f some-iop.yaml
asmcli: Downloading ASM..
Generating equivalent configuration for Anthos Service Mesh managed control plane...
Migrating MeshConfig settings...
✔ Wrote MeshConfig to asm-generated-configs/meshconfig.yaml.
Migrating gateway deployments...
Checking configuration compatibility...
! Found unsupported configurations:
Components.Base: not configurable in managed control plane
Components.Pilot: not configurable in managed control plane
Hub=gcr.io/gke-release/asm: not configurable in managed control plane
Tag=1.10.4-asm.6: not configurable in managed control plane
Actions required to migrate:
! Found potentially unsupported configurations; review warnings above before proceeding
- Found custom mesh configuration settings. To apply these settings to ASM managed
control plane, run: `kubectl apply -f 'asm-generated-configs/meshconfig.yaml'`
TIP: steps recommending `kubectl apply` to be run should be integrated into your
CI/CD pipeline, if applicable.
後續步驟
- 進一步瞭解受管理控制層支援的功能