You are viewing documentation for Anthos Service Mesh 1.7. View the latest documentation or select another available version:

Registering clusters to the fleet

You need to register your GKE cluster with your project's fleet by using Connect. A fleet provides a unified way to view and manage multiple clusters and their workloads. You can find out more about fleets and the functionality that they enable in our Fleets guide.

You don't need to register all your clusters at once, but clusters won't appear on the Anthos Clusters page in the Cloud Console until you register them.

Using the gcloud command-line tool provides you with some more advanced cluster registration options that are not available in the Cloud Console, including downloading and applying the Connect Agent manifest yourself. To find out more about these options, see advanced registration options in the Connect documentation.

Before you begin

Registering your cluster


  1. Determine if Workload Identity is enabled on your GKE cluster

    Run the following command to list which Workload Identity pool your cluster is a member of

    gcloud container clusters describe GKE_CLUSTER --format="value(workloadIdentityConfig.workloadPool)"

    Replace the following:

    • GKE_CLUSTER: the name of the GKE cluster for the current project.

    If you see a result similar to the following then Workload Identity is already enabled on your GKE cluster and you can proceed directly to "Register the Cluster" below.

    If there are no results, then Workload Identity is not enabled on the GKE cluster. Please continue to enable Workload Identity on your GKE cluster before proceeding to register the cluster.

  2. Enable Workload Identity

    Carefully follow the linked instructions to enable GKE Workload Identity. Enabling GKE Workload Identity changes authentication behavior for any new node pools created after it is enabled, which can affect applications that rely on service accounts attached to Compute Engine instances in the node pool.

  3. Register the Cluster

    Run either of the following commands to register the cluster:

    gcloud beta container hub memberships register MEMBERSHIP_NAME \
     --gke-uri=GKE_URI \


    gcloud beta container hub memberships register MEMBERSHIP_NAME \
     --gke-cluster=GKE_CLUSTER \

    Replace the following:

    • MEMBERSHIP_NAME: the membership name that you choose to uniquely represent the cluster being registered to the fleet.
    • GKE_URI: the URI of the GKE cluster, for example: You can obtain the URI by running gcloud container clusters list --uri.
    • GKE_CLUSTER: the location/name of the GKE cluster from the current project. The location can be a zone or a region, for example: us-central1-a/my-gke-cluster.

What's next