Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Mengaktifkan dan menonaktifkan pengontrol Layanan Kanonik
Catatan: Layanan Kanonik didukung secara otomatis di Cloud Service Mesh versi 1.6.8 dan yang lebih baru.
Saat Anda menginstal atau mengupgrade Cloud Service Mesh menggunakan
asmcli, tindakan ini akan men-deploy
pengontrol Layanan Kanonik
ke cluster Anda. Pengontrol Layanan Kanonik mengelompokkan beban kerja yang termasuk dalam
layanan logika yang sama, dan diperlukan untuk fungsi penuh
dasbor Layanan di konsol Google Cloud . Men-deploy pengontrol akan membuat deployment canonical-service-controller-manager di cluster Anda di namespace asm-system, dan tidak memengaruhi layanan atau beban kerja Anda.
Jika tidak menggunakan alat asmcli untuk menginstal Cloud Service Mesh, Anda mungkin tidak mengaktifkan pengontrol Layanan Kanonik di cluster. Untuk menentukan apakah
pengontrol Layanan Kanonik diaktifkan di cluster Anda:
kubectl get services -n asm-system
Mengaktifkan pengontrol Layanan Kanonik dalam cluster
Jika pengontrol Layanan Kanonik tidak diaktifkan, Anda dapat mengaktifkannya dengan
langkah-langkah berikut:
Download paket kpt yang berisi pengontrol ke direktori kerja
saat ini:
Jika tidak ingin menginstal pengontrol dalam cluster, Anda dapat mengaktifkan Pengontrol Layanan Kanonik Terkelola, yang menjalankan fungsi yang sama untuk semua cluster terdaftar di mesh tanpa perlu menginstal atau mengelola pengontrol sendiri.
Pengontrol terkelola dirancang untuk mengikuti pengontrol dalam cluster.
Jika bermigrasi dari pengontrol dalam cluster, Anda harus menghapus pengontrol dalam cluster dari setiap cluster tempat pengontrol tersebut berjalan agar pengontrol terkelola dapat mengambil alih. Untuk mengetahui informasi selengkapnya, lihat
Menonaktifkan pengontrol Layanan Kanonik dalam cluster.
Untuk mengaktifkan Pengontrol terkelola:
Halaman Fitur Anthos
Di Google Cloud console, buka halaman Cluster GKE Enterprise.
Setelah beberapa menit, pengontrol Terkelola akan mengaktifkan dan membuat Layanan
Kanonis untuk beban kerja yang berjalan di cluster terdaftar di mesh Anda. Jalankan
kubectl get canonicalservices --all-namespaces untuk mengonfirmasi bahwa beberapa
Layanan Kanonik telah dibuat untuk beban kerja di mesh Anda.
Deskripsi menyatakan bahwa Layanan Kanonik berhasil direkonsiliasi:
projects/<your project number>/locations/global/memberships/<your cluster 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'
Jika Layanan Kanonik tidak berhasil direkonsiliasi, akan ada
pesan error, atau output yang mirip dengan pesan berikut:
projects/<your project number>/locations/global/memberships/<your cluster 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/v1.19/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
Penginstalan bidang kontrol terkelola
Jika Anda menginstal Cloud Service Mesh terkelola (dengan
fleet API atau dengan
asmcli),
Managed Canonical Service Controller akan diinstal secara default.
Pastikan Anda menjalankan Pengontrol Layanan Kanonik Terkelola dengan menjalankan
perintah berikut:
Deskripsi menyatakan bahwa Layanan Kanonik berhasil direkonsiliasi:
projects/<your project number>/locations/global/memberships/<your cluster 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'
Jika Layanan Kanonik tidak berhasil direkonsiliasi, akan ada
pesan error, atau output yang mirip dengan pesan berikut:
projects/<your project number>/locations/global/memberships/<your cluster 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/v1.19/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
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 UTC."],[],[],null,["# Enabling and disabling the Canonical Service controller\n=======================================================\n\n\n**Note:** Canonical Services are supported automatically in Cloud Service Mesh version 1.6.8 and higher.\n\nWhen you install or upgrade Cloud Service Mesh using the\n[`asmcli`](/service-mesh/v1.19/docs/unified-install/asmcli-overview), it deploys the\n[Canonical Service controller](https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages/blob/master/asm/canonical-service/controller.yaml)\nto your cluster. The Canonical Service controller groups workloads belonging to\nthe same logical service, and is required for the full functionality of\nthe Services dashboard in the Google Cloud console. Deploying the controller\ncreates the `canonical-service-controller-manager` deployment in your cluster in\nthe `asm-system` namespace, and does not affect your services or workloads.\n\nIf you didn't use the `asmcli` tool to install Cloud Service Mesh, you might not have\nthe Canonical Service controller enabled on your cluster. To determine if the\nCanonical Service controller is enabled on your cluster: \n\n kubectl get services -n asm-system\n\nEnable the in-cluster Canonical Service controller\n--------------------------------------------------\n\nIf the Canonical Service controller isn't enabled, you can enable it with\nthe following steps:\n\n1. Download the `kpt` package that contains the controller to the current working\n directory:\n\n kpt pkg get https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/asm@release-1.19 asm\n\n2. Apply the controller configuration:\n\n kubectl apply -f asm/canonical-service/controller.yaml\n\nDisable the in-cluster Canonical Service controller\n---------------------------------------------------\n\nIf you want to disable the Canonical Service controller:\n\n1. Download the kpt package that contains the controller to the current working\n directory:\n\n kpt pkg get https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/asm@release-1.19 asm\n\n2. Delete the controller from your cluster:\n\n kubectl delete -f asm/canonical-service/controller.yaml\n\nEnable the Managed Canonical Service Controller\n-----------------------------------------------\n\n| **Platform note:** Managed Canonical Service Controller is not supported on Google Distributed Cloud (includes Google Distributed Cloud and Google Distributed Cloud).\n\nIf you would prefer not to install the in-cluster controller, you can instead\nenable the Managed Canonical Service Controller, which performs the same\nfunction for all the registered clusters in your mesh without the need to\ninstall or manage the controller yourself.\n\nThe managed controller is designed to yield to the in-cluster controller.\nIf you are migrating from the in-cluster controller, you must delete the\nin-cluster controller from each cluster it is running on for the managed\ncontroller to take over. For more information, see\n[Disable the in-cluster Canonical Service controller](#disable-in-cluster-service-controller).\n\nTo enable the Managed controller: \n\n### Anthos Features Page\n\n1. In the Google Cloud console, go to the **GKE Enterprise** Clusters page.\n\n [Go to the GKE Enterprise Clusters page](https://console.cloud.google.com/anthos/clusters)\n2. \"Register\" all the clusters in your mesh.\n\n3. In the Google Cloud console, go to the **GKE Enterprise** Features page.\n\n [Go to the GKE Enterprise Features page](https://console.cloud.google.com/anthos/features)\n4. Click **Enable** next to the \"Service Mesh\" feature\n\nAfter a few minutes, the Managed controller activates and creates Canonical\nServices for the workloads running on registered clusters in your mesh. Run\n`kubectl get canonicalservices --all-namespaces` to confirm that some\nCanonical Services have been created for the workloads in your mesh.\n\n### GKE cluster creation\n\nIf you used the [**Enable Cloud Service Mesh** option when creating a new\nGKE cluster](/service-mesh/v1.19/docs/managed/install-anthos-service-mesh-console), then the\nManaged Canonical Service Controller was installed by default.\n\nEnsure you are running the Managed Canonical Service Controller by running the\nfollowing command: \n\n```\ngcloud beta container hub mesh describe --project=PROJECT_ID\n```\n\nThe description states that the Canonical Services are reconciled successfully: \n\n projects/\u003cyour project number\u003e/locations/global/memberships/\u003cyour cluster name\u003e:\n code: OK\n description: |-\n Revision(s) ready for use: asm-managed.\n All Canonical Services have been reconciled successfully.\n servicemeshFeatureState: {}\n updateTime: '2021-11-16T21:10:36.289467777Z'\n\nIf the Canonical Services aren't reconciled successfully, there will either be\nan error message, or an output similar to the following message: \n\n projects/\u003cyour project number\u003e/locations/global/memberships/\u003cyour cluster name\u003e:\n code: OK\n description: |-\n Revision(s) ready for use: istiod-asm-173-6.\n The Managed Canonical Service Controller is yielding to the in-cluster controller. See https://cloud.google.com/service-mesh/v1.19/docs/canonical-service-controller-enable-and-disable#disable-in-cluster-service-controller for instructions on removing the in-cluster controller.\n servicemeshFeatureState: {}\n updateTime: '2021-11-16T21:05:43.286828851Z'\n lifecycleState: ENABLED\n\n### Managed control plane installation\n\nIf you installed managed Cloud Service Mesh (with the\n[fleet API](/service-mesh/v1.19/docs/managed/provision-managed-anthos-service-mesh) or with\n[`asmcli`](/service-mesh/v1.19/docs/managed/provision-managed-anthos-service-mesh-asmcli)),\nthen the Managed Canonical Service Controller was installed by default.\n\nEnsure you are running the Managed Canonical Service Controller by running the\nfollowing command: \n\n```\ngcloud beta container hub mesh describe --project=PROJECT_ID\n```\n\nThe description states that the Canonical Services are reconciled successfully: \n\n projects/\u003cyour project number\u003e/locations/global/memberships/\u003cyour cluster name\u003e:\n code: OK\n description: |-\n Revision(s) ready for use: asm-managed.\n All Canonical Services have been reconciled successfully.\n servicemeshFeatureState: {}\n updateTime: '2021-11-16T21:10:36.289467777Z'\n\nIf the Canonical Services aren't reconciled successfully, there will either be\nan error message, or an output similar to the following message: \n\n projects/\u003cyour project number\u003e/locations/global/memberships/\u003cyour cluster name\u003e:\n code: OK\n description: |-\n Revision(s) ready for use: istiod-asm-173-6.\n The Managed Canonical Service Controller is yielding to the in-cluster controller. See https://cloud.google.com/service-mesh/v1.19/docs/canonical-service-controller-enable-and-disable#disable-in-cluster-service-controller for instructions on removing the in-cluster controller.\n servicemeshFeatureState: {}\n updateTime: '2021-11-16T21:05:43.286828851Z'\n lifecycleState: ENABLED\n\nWhat's next\n-----------\n\nLearn about:\n\n- [Canonical Services](/service-mesh/v1.19/docs/canonical-service)\n- [Best practices in Canonical Services](/service-mesh/v1.19/docs/canonical-service-best-practices)\n- [Defining a Canonical Service](/service-mesh/v1.19/docs/observability/defining-canonical-service)\n- [Resolving Canonical Service issues](/service-mesh/v1.19/docs/troubleshooting/troubleshoot-canonical-service)"]]