Creating a fleet involves registering the clusters you want to manage together to a fleet in your chosen fleet host project. Depending on the cluster type and where it lives, registration can happen automatically at cluster creation time with registration details specified in the cluster configuration, or you may need to manually add the cluster to your fleet.
This page provides an overview of how fleet creation works, with details for different cluster types. For more information about how to manually register clusters to your fleet and prerequisites for manual registration, see our detailed fleet creation guides.
About fleet membership
Once you register a cluster to a fleet, it becomes a fleet member. Because fleets can include clusters from multiple projects and environments, you must ensure that each cluster you add to your fleet has a unique name. This is sometimes referred to in commands and documentation as the cluster's fleet membership name. Typically, a cluster's fleet membership name is its regular cluster name, but you may need to create a new name at registration time (for example by appending or prepending a qualifier to the original cluster name) if another cluster with that name already exists in the fleet. If you attempt to register a cluster with an existing name to your fleet, registration will fail.
GKE clusters on Google Cloud must be explicitly registered to add them to a fleet. You can choose between quick registration from the Fleets page in the console (users with the Anthos API enabled only), registration from the command line with the gcloud CLI, or declarative registration using Terraform or Config Connector. Find out more about these options in Register a GKE cluster to your fleet.
Clusters on Google Cloud can be registered to a fleet in their current project or (with some extra permissions) to a fleet in a different project.
Clusters outside Google Cloud
If you have enabled the Anthos platform, you can add clusters outside Google Cloud to your fleet and view and manage your clusters across different environments together. Anthos clusters (GKE clusters outside Google Cloud) are mostly registered to your fleet automatically at cluster creation time, as described in the rest of this section below. If you want to add third-party Kubernetes clusters to your fleet, you must register them manually.
Registering clusters outside Google Cloud installs the Connect Agent on the cluster to handle communication between the cluster and your Google Cloud project. You can read more about how the Connect Agent works in the Connect Agent overview.
Anthos clusters on-premises (Google Distributed Cloud Virtual)
Anthos clusters on VMware and Anthos clusters on bare metal are automatically registered to your chosen fleet at cluster creation time, with your fleet host project and other registration details specified in the relevant cluster configuration file. If you are using Anthos clusters on VMware, note that only user clusters must be registered, though you can optionally add registration details to admin cluster configurations too if you want to manage them as part of your fleet.
In rare circumstances you may need to update an on-premises Anthos cluster's registration status, for example if you want to register an existing admin cluster on VMware. To do this, follow the instructions for manually registering a cluster outside Google Cloud.
Anthos clusters on other public clouds
Anthos clusters on AWS and Azure created using the Anthos Multi-Cloud API are automatically registered to your chosen fleet at cluster creation time, with your fleet host project specified when you run the relevant
gcloud cluster create command. Because clusters created using Anthos Multi-Cloud already have a project associated with them (the project where the API is enabled), you need to do some additional setup at cluster creation if you want to register them to a fleet in a different project. Clusters created with the Anthos Multi-Cloud API cannot be unregistered or manually registered.
Third-party Kubernetes clusters (attached clusters)
If you have existing third-party Kubernetes clusters (such as EKS, AKS, or on-premises distributions) that you want to manage as fleet members, you can register these to your project fleet along with any GKE and Anthos clusters. You can attach any conformant Kubernetes cluster that includes x86 nodes to your fleet, although only certain cluster types and versions have been validated by Google. You can find details of current supported types and versions in Attach third-party Kubernetes clusters to your fleet, along with supported fleet-enabled features for attached clusters. Any third-party clusters you register will incur a per-vCPU charge as part of your Anthos pricing.
To register an attached cluster, follow the instructions for registering a cluster outside Google Cloud, paying attention to any specific prerequisites for your Kubernetes cluster type.
Move a cluster to a different fleet
Moving registered clusters between fleets (unregistering then reregistering) is not currently recommended, as it can result in unexpected or unwanted behavior: for example, your workloads' fleet Workload Identity will change, potentially resulting in blocked requests and outages. The recommended approach is to create a new cluster in the fleet in which you want your workloads to reside, then move your workloads from your old cluster to the new cluster.
Register a GKE cluster:
Manually register a cluster outside Google Cloud: