Version 1.2. This version is not fully supported. For the latest patches and updates for security vulnerabilities, exposures, and issues impacting GKE On-Prem, upgrade to a fully supported version. You can find the most recent version here.

Configuring your Google Cloud project

This page shows how to configure your Google Cloud project before you install GKE on-prem.

To install GKE on-prem, you must have an Anthos subscription. And if you have an Anthos subscription, you have already done the following:

  • Created a Google Cloud project.
  • Arranged for your Google Cloud project to be allowlisted.
  • Arranged for your Google account to be allowlisted.
  • Possibly arranged for the individual Google accounts of your team members to be allowlisted.
  • In your Google Cloud project, created a service account and arranged for your service account to be allowlisted. In the GKE on-prem documentation, this service account is referred to as your allowlisted service account.

Logging in

Log in to Google Cloud using your account credentials:

gcloud auth login

Setting a default project ID

Enter the following command to set a default project ID:

gcloud config set project [PROJECT_ID]

where [PROJECT_ID] is your project ID.

Now that you have set a default project ID, you won't have to include the --project flag in your gcloud commands.

Enabling the required APIs in your project

You need to enable the following APIs in your Google Cloud project:

  • cloudresourcemanager.googleapis.com
  • container.googleapis.com
  • gkeconnect.googleapis.com
  • gkehub.googleapis.com
  • serviceusage.googleapis.com
  • stackdriver.googleapis.com
  • monitoring.googleapis.com
  • logging.googleapis.com

To enable these APIs, run the following command:

Linux and macOS

gcloud services enable \
    cloudresourcemanager.googleapis.com \
    container.googleapis.com \
    gkeconnect.googleapis.com \
    gkehub.googleapis.com \
    serviceusage.googleapis.com \
    stackdriver.googleapis.com \
    monitoring.googleapis.com \
    logging.googleapis.com

Windows

gcloud services enable ^
    cloudresourcemanager.googleapis.com ^
    container.googleapis.com ^
    gkeconnect.googleapis.com ^
    gkehub.googleapis.com ^
    serviceusage.googleapis.com ^
    stackdriver.googleapis.com ^
    monitoring.googleapis.com ^
    logging.googleapis.com

Creating a Cloud Monitoring Workspace

Cloud Logging and Cloud Monitoring are enabled by default for GKE on-prem. For Monitoring to function properly, you need to create Cloud Monitoring Workspace.

To learn how to create a workspace, refer to Creating a single-project Workspace in the Monitoring documentation.