啟用及停用標準服務控制器

注意:Cloud Service Mesh 1.6.8 以上版本會自動支援 Canonical 服務。

標準服務控制器會將屬於相同邏輯服務的工作負載分組,並且必須在 Google Cloud 主控台的「服務」資訊主頁中提供完整功能。

所有代管 Cloud Service Mesh 安裝作業,以及在叢集內安裝作業,使用由代管 Canonical 服務控制器佈建的 asmcli 1.25 以上版本。叢集內的標準服務控制器已淘汰,且不會再收到更新。雖然叢集內控制器的現有部署作業會繼續運作,但我們強烈建議您遷移至受控的 Canonical Service Controller,以確保與日後版本的相容性、存取最新功能,以及持續支援。

如要判斷叢集中是否已啟用叢集內的標準服務控制器,請按照下列步驟操作:

kubectl get services -n asm-system

停用叢集中的標準服務控制器

對於現有的叢集內控制器部署作業,您應遷移至受管理的標準服務控制器。請參閱遷移指南

啟用 Managed Canonical Service Controller

如果您安裝了代管 Cloud Service Mesh,則系統會預設安裝 Managed Canonical Service Controller。此外,所有使用 1.25 以上版本 asmcli 的集群內部 Cloud Service Mesh 安裝作業,都會透過代管的 Canonical Service 控制器佈建。

執行下列指令,確認您正在執行 Managed Canonical Service Controller:

將 FLEET_PROJECT_ID 替換為車隊主機專案的 ID。一般來說,FLEET_PROJECT_ID 的名稱會與專案相同。

  gcloud beta container hub mesh describe --project FLEET_PROJECT_ID
  1. 如果說明指出標準服務已成功進行調和,則表示管理式標準服務控制器運作正常。不需要執行其他動作了。

      projects/<your project number>/locations/<location>/memberships/<membership-name>:
        code: OK
        description: |-
          Revision(s) ready for use: asm-managed.
          All Canonical Services have been reconciled successfully.
        servicemeshFeatureState: {}
        updateTime: '2021-11-16T21:10:36.289467777Z'
    
  2. 如果說明指出 Managed Canonical Service Controller 會讓位給叢集內的控制器,請按照遷移指南操作。

      projects/<your project number>/locations/<location>/memberships/<membership-name>:
        code: OK
        description: |-
          Revision(s) ready for use: istiod-asm-173-6.
          The Managed Canonical Service Controller is yielding to the in-cluster controller.  See https://cloud.google.com/service-mesh/docs/canonical-service-controller-enable-and-disable#disable-in-cluster-service-controller for instructions on removing the in-cluster controller.
        servicemeshFeatureState: {}
        updateTime: '2021-11-16T21:05:43.286828851Z'
      lifecycleState: ENABLED
    
  3. 如有其他問題,請參閱「解決 Managed Canonical Service Controller 問題」一文,瞭解疑難排解指引。

後續步驟

瞭解下列內容: