Setting up Cloud Run for Anthos deployed on VMware

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

Note that installing Cloud Run for Anthos deployed on VMware 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 deployed on VMware:

  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 Anthos GKE deployed 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 deployed on VMware

You can install Cloud Run on an existing Anthos GKE deployed on-prem cluster or while creating or upgrading your cluster:

Anthos 1.2

When creating or upgrading a cluster, you can enable Cloud Run for Anthos deployed on VMware on a GKE on-prem cluster by setting the cloudrun configuration in the config.yaml file:

  enabled: true

To install on an existing Anthos 1.2 cluster:

  1. Add a Cloud Run configmap to the admin cluster:

    kubectl --kubeconfig /path/to/admin/kubeconfig \
    create configmap \
    --namespace user-cluster-name \
  2. Ensure gkectl is installed.

  3. Rebuild the user cluster using gkectl upgrade:

    gkectl upgrade cluster \
    --kubeconfig /path/to/admin/kubeconfig \
    --config /path/to/config.yaml \
    --cluster-name user-cluster-name

Anthos 1.1

  1. Create a Anthos GKE deployed on-prem admin and user cluster by following the Anthos GKE deployed on-prem Installation guide.

  2. If you're running a version 1.0 Anthos GKE deployed on-prem cluster, you need to update the Connect Agent deployed to that cluster.

  3. If you want to avoid specifying the --kubeconfig flag when using the gcloud or kubectl command line, set the KUBECONFIG environment variable:

    export KUBECONFIG=/path/to/kubeconfig

    Replace /path/to/kubeconfig with the path to your cluster's kubeconfig files.

  4. Install Cloud Run for Anthos deployed on VMware to the cluster:

    kubectl apply -f
    kubectl apply -f
    kubectl apply -f

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