Setting up Cloud Run for Anthos deployed on VMware

This guide shows how to set up a GKE 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.

Prerequisites

  1. Google アカウントにログインします。

    Google アカウントをまだお持ちでない場合は、新しいアカウントを登録します。

  2. GCP プロジェクトを選択または作成します。

    プロジェクト セレクタのページに移動

  3. Google Cloud Platform プロジェクトに対して課金が有効になっていることを確認します。 詳しくは、課金を有効にする方法をご覧ください。

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 gcloud beta components:

    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

Creating a GKE On-Prem cluster with Cloud Run enabled

  1. Create a GKE On-Prem admin and user cluster by following the GKE On-Prem Installation guide.

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

  3. Avoid specifying the --kubeconfig flag when using the gcloud or kubectl command line by setting 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 https://storage.googleapis.com/cloud-run-for-anthos/install/0.9.0/1-cluster-local-gateway.yaml
    kubectl apply -f https://storage.googleapis.com/cloud-run-for-anthos/install/0.9.0/2-cloudrun.yaml --selector knative.dev/crd-install=true
    kubectl apply -f https://storage.googleapis.com/cloud-run-for-anthos/install/0.9.0/2-cloudrun.yaml
    

Setting up the GCP Console

When using the GCP 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

このページは役立ちましたか?評価をお願いいたします。

フィードバックを送信...