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 deployed on GKE 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 4 vCPU
  • Scopes: https://www.googleapis.com/auth/logging.write, https://www.googleapis.com/auth/monitoring.write
  • Regional cluster. Not required, but recommended for high availability:

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 GCP Console:

    Go to Google Kubernetes Engine

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

  3. Click Edit

  4. Disable Legacy Stackdriver Logging.

  5. Disable Legacy Monitoring.

  6. Enable Stackdriver Kubernetes Engine Monitoring.

  7. Click Save.

  8. Return to the main Kubernetes cluster page and wait for the cluster update changes to propagate.

  9. Click on the cluster to open it and then click Edit again.

  10. Select Enable Istio.

  11. Select Enable Cloud Run for Anthos deployed on GKE.

  12. 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=Istio=ENABLED,CloudRun=ENABLED,HorizontalPodAutoscaling,HttpLoadBalancing \
    --enable-stackdriver-kubernetes \
    --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 GCP Console:

    Go to Google Kubernetes Engine

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

  3. Select Disable Cloud Run for Anthos deployed on GKE.

  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..

Var denne side nyttig? Giv os en anmeldelse af den:

Send feedback om...

Cloud Run Documentation