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.
Sign in to your Google Account.
If you don't already have one, sign up for a new account.
In the Cloud Console, on the project selector page, select or create a Cloud project.
Make sure that billing is enabled for your Google Cloud project. Learn how to confirm billing is enabled for your project.
To set up the
gcloud command line for Cloud Run for Anthos deployed on VMware:
If you haven't already, install and initialize the Cloud SDK.
Set the platform to
kubernetesand set your default project setting for
gcloudto the one you just created:
gcloud config set run/platform kubernetes gcloud config set project PROJECT-ID
Replace PROJECT_ID with your project ID.
gcloud components update
gcloud components install beta
If you are already using Anthos GKE deployed on-prem,
kubectl may already be
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:
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
cloudrun: enabled: true
To install on an existing Anthos 1.2 cluster:
Add a Cloud Run configmap to the admin cluster:
kubectl --kubeconfig /path/to/admin/kubeconfig \ create configmap \ --namespace user-cluster-name \ bundle-options-cloud-run
Ensure gkectl is installed.
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
Create a Anthos GKE deployed on-prem admin and user cluster by following the Anthos GKE deployed on-prem Installation guide.
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.
If you want to avoid specifying the
--kubeconfigflag when using the
kubectlcommand line, set the
Replace /path/to/kubeconfig with the path to your cluster's kubeconfig files.
Install Cloud Run for Anthos deployed on VMware to the cluster:
kubectl apply -f https://storage.googleapis.com/cloud-run-for-anthos/install/0.10.0/1-cluster-local-gateway.yaml kubectl apply -f https://storage.googleapis.com/cloud-run-for-anthos/install/0.10.0/2-cloudrun-operator.yaml kubectl apply -f https://storage.googleapis.com/cloud-run-for-anthos/install/0.10.0/3-knative-serving.yaml
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.