Setting up Cloud Run for Anthos on-prem

This guide shows how to set up a GKE on-prem cluster with Cloud Run for Anthos on-prem enabled.

Note that installing Cloud Run for Anthos on-prem installs Knative Serving into the cluster to connect and manage your stateless workloads.


  1. Sign in to your Google Account.

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

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

    Go to the project selector page

  3. Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.

Setting up gcloud

To set up the gcloud command line for Cloud Run for Anthos on-prem:

  1. If you haven't already, install and initialize the Cloud SDK.

  2. Set the platform to kubernetes and set your default project setting for gcloud to the one you just created:

    gcloud config set run/platform kubernetes
    gcloud config set project PROJECT-ID

    Replace PROJECT_ID with your project ID.

  3. Update installed gcloud components:

    gcloud components update
  4. Install the gcloudcomponents:

    gcloud components install beta

Setting up kubectl

If you are already using GKE on-prem, kubectl may already be installed.

If kubectl is not installed, you can install it using the command:

gcloud components install kubectl

Installing Cloud Run for Anthos on-prem

You can install Cloud Run while creating a new GKE on-prem cluster by setting the cloudrun configuration in the config.yaml file:

  enabled: true

Setting up the Cloud Console

When using the Cloud Console, login to the cluster. If you are using a Kubernetes Service Account, be sure to add the cluster-admin role to the Service Account.

What's next