Version 1.11

Enabling and disabling the Canonical Service controller

Note: Canonical Services are supported automatically in Anthos Service Mesh version 1.6.8 and higher.

When you install or upgrade Anthos Service Mesh using the asmcli, it deploys the Canonical Service controller to your cluster. The Canonical Service controller groups workloads belonging to the same logical service, and it is required for the full functionality of the Services dashboard in the Cloud Console. Deploying the controller creates the canonical-service-controller-manager Deployment in your cluster in the asm-system namespace, and does not affect your services or workloads.

If you didn't use the asmcli to install Anthos Service Mesh, you might not have the Canonical Service controller enabled on your cluster. To determine if the Canonical Service controller is enabled on your cluster:

kubectl get services -n asm-system

Enable the in-cluster Canonical Service controller

If the Canonical Service controller isn't enabled, you can enable it with the following steps:

  1. Download the kpt package that contains the controller to the current working directory:

    kpt pkg get https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/asm@release-1.11 asm
    
  2. Apply the controller configuration:

        kubectl apply -f asm/canonical-service/controller.yaml
    

Disable the in-cluster Canonical Service controller

If you want to disable the Canonical Service controller:

  1. Download the kpt package that contains the controller to the current working directory:

    kpt pkg get https://github.com/GoogleCloudPlatform/anthos-service-mesh-packages.git/asm@release-1.11 asm
    
  2. Delete the controller from your cluster:

    kubectl delete -f asm/canonical-service/controller.yaml
    

Enable the Managed Canonical Service Controller (Preview)

If you would prefer not to install the in-cluster controller, you can instead enable the Managed Canonical Service Controller, which performs the same same function for all the registered clusters in your mesh without the need to install or manage the controller yourself. To enable the Managed controller:

  1. In the Google Cloud Console, go to the Anthos Clusters page.

    Go to the Anthos Clusters page

  2. "Register" all the clusters in your mesh.

  3. In the Google Cloud Console, go to the Anthos Features page.

    Go to the Anthos Features page

  4. Click Enable next to the "Service Mesh" feature

After a few minutes, the Managed controller activates and creates Canonical Services for the registered clusters in your mesh. To confirm it is working run kubectl get canonicalservices --all-namespaces and confirm that some Canonical Services have been created for the workloads in your mesh.

What's next

Learn about: