Setting up Anthos on Google Cloud

This page shows you how to set up Anthos on Google Cloud only.

Before you start

  1. Sign in to your Google Account.

    If you don't already have one, sign up for a new account.

  2. In the Google Cloud Console, on the project selector page, select or create a Google Cloud project.

    Go to the project selector page

  3. Zorg dat facturering is ingeschakeld voor uw project.

    Meer informatie over het inschakelen van facturering

  4. Enable the Anthos API.

    Enable the API

  5. Install and initialize the Cloud SDK.

Cluster requirements

Anthos on Google Cloud supports both release channels and static versions. However, we recommend the use of release channels whenever possible, as they provide additional benefits such as automated updates to GKE clusters.

Registering clusters to the environ

Regardless of where your clusters are, you need to register any clusters that you want to use with Anthos with your project's environ by using Connect. An environ provides a unified way to view and manage multiple clusters and their workloads as part of Anthos. You can find out more about environs and the functionality that they enable in our Environs guide.

You don't need to register all your clusters at once, but you need to do so each time that you create a new cluster to make sure that it's visible on your Anthos Clusters page in the Cloud Console, and so that you can use all Anthos features. Anthos charges apply only to your registered clusters.

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.

Check the Connect prerequisites before registering your cluster to ensure that you have the relevant permissions and enabled APIs to register a cluster.

Console

To register a cluster:

  1. In the Google Cloud Console, go to the Anthos Clusters page. This page shows all your registered clusters.

    Go to the Anthos Clusters page

  2. Click Register existing cluster.

  3. Click Register next to the unregistered cluster that you want to add to your environ.

  4. Specify the service account that you want to use when registering the cluster. We recommend keeping the default behavior and creating a new service account.

    • If you select Create a new service account:
      • Specify a Service account ID to identify your new service account.
      • Choose if you want to download its service account key as a JSON file. We recommend keeping the default behavior and downloading the key because you won't be able to download it later.
    • If you select Use existing service account, paste in the account's service account key in JSON format.
  5. Optional: Specify a new membership name for your cluster. By default, a cluster's membership name is its current name. However, if your cluster's name is not unique within your project, you must specify a new unique membership name because all clusters require a unique identifier within their environ.

  6. To register your cluster, click Submit.

gcloud

Run either of the following commands:

gcloud container hub memberships register MEMBERSHIP_NAME \
   --gke-uri=GKE_URI \
   --service-account-key-file=SERVICE_ACCOUNT_KEY_PATH

or

gcloud container hub memberships register MEMBERSHIP_NAME \
   --gke-cluster=GKE_CLUSTER \
   --service-account-key-file=SERVICE_ACCOUNT_KEY_PATH

Replace the following:

  • MEMBERSHIP_NAME: the membership name that you choose to uniquely represent the cluster being registered on the Hub.
  • SERVICE_ACCOUNT_KEY_PATH: the local filepath to the service account's private key JSON file downloaded as part of Prerequisites. This service account key is stored as a secret named creds-gcp in the gke-connect namespace.
  • GKE_URI: the URI of the GKE cluster, for example: https://container.googleapis.com/projects/my-gke-project/locations/us-central1-a/clusters/my-gke-cluster. 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.

Enabling Anthos features

After you set up your project and your GKE clusters, use the following guides to enable additional Anthos features for your applications. For complete documentation sets for all Anthos components, including tutorials, reference material, and more, see Anthos components.

Enabling features on Google Cloud