Enabling Cloud Run on existing GKE clusters

This guide shows how to enable Cloud Run on existing GKE clusters.

Note that enabling Cloud Run for Anthos on Google Cloud installs Istio and Knative Serving into the cluster to connect and manage your stateless workloads.

Prerequisites

This page assumes that you have already set up your environment and have a cluster with the following minimum configuration:

  • Nodes with 2 vCPU
  • Scopes: https://www.googleapis.com/auth/logging.write, https://www.googleapis.com/auth/monitoring.write

Enabling an existing cluster for Cloud Run

You can use either the gcloud command line or the console to enable Cloud Run for a cluster:

Console

To enable an existing cluster for Cloud Run:

  1. Go to the Google Kubernetes Engine page in the Cloud Console:

    Go to Google Kubernetes Engine

  2. Click on the cluster you want to enable for Cloud Run.

  3. Click Edit

  4. Select Enable Cloud Run for Anthos on Google Cloud.

  5. Click Save. After the update completes, the cluster will support Cloud Run.

Command line

To enable an existing cluster for Cloud Run:

  1. Enable the cluster using the command:

    gcloud beta container clusters update \
    CLUSTER_NAME \
    --update-addons=CloudRun=ENABLED,HorizontalPodAutoscaling=ENABLED,HttpLoadBalancing=ENABLED \
    --zone=ZONE

    Replace

    • CLUSTER_NAME with the name you want for your cluster.
    • ZONE with the zone you are using for your cluster, for example, us-central1-a.
  2. Wait for the enabling to complete: upon success, you will see a message similar to Updating your-cluster-name...done..

Disabling Cloud Run for a cluster

You can disable Cloud Run for a cluster at any time, using the console or the command line.

Console

To disable Cloud Run on a cluster:

  1. Go to the Google Kubernetes Engine page in the Cloud Console:

    Go to Google Kubernetes Engine

  2. Click the cluster where you want to disable Cloud Run.

  3. Select Disable Cloud Run for Anthos on Google Cloud.

  4. Optionally disable any addons you will not use in your cluster without Cloud Run. This may include Istio.

  5. Click Save.

Command line

To delete a cluster:

  1. Invoke the following command:

    gcloud beta container clusters update CLUSTER_NAME --update-addons=Istio=DISABLED,CloudRun=DISABLED --zone=ZONE
    

    Replace

    • CLUSTER_NAME with the name you want for your cluster.
    • ZONE with the zone you are using for your cluster, for example, us-central1-a.
  2. Wait for the enabling to complete: upon success, you will see a message similar to Updating your-cluster-name...done..

Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Run Documentation