Google Cloud プロジェクトの構成

GKE On-Prem をインストールするには、Google Cloud プロジェクトが必要です。このページでは、Cloud プロジェクトの構成方法について説明します。

ログイン

アカウントの認証情報を使用して Google Cloud にログインします。

gcloud auth login

デフォルトのプロジェクト ID の設定

デフォルトのプロジェクト ID を設定します。

gcloud config set project [PROJECT_ID]

ここで、[PROJECT_ID] はプロジェクト ID です。

デフォルトのプロジェクト ID を設定したので、gcloud コマンドに --project フラグを指定する必要はありません。

プロジェクトで必要な API を有効にする

Google Cloud プロジェクトで必要な API を有効にします。

Linux と macOS

gcloud services enable \
    anthos.googleapis.com \
    anthosgke.googleapis.com \
    anthosaudit.googleapis.com \
    cloudresourcemanager.googleapis.com \
    container.googleapis.com \
    gkeconnect.googleapis.com \
    gkehub.googleapis.com \
    serviceusage.googleapis.com \
    stackdriver.googleapis.com \
    monitoring.googleapis.com \
    logging.googleapis.com

Windows

gcloud services enable ^
    anthos.googleapis.com ^
    anthosgke.googleapis.com ^
    anthosaudit.googleapis.com ^
    cloudresourcemanager.googleapis.com ^
    container.googleapis.com ^
    gkeconnect.googleapis.com ^
    gkehub.googleapis.com ^
    serviceusage.googleapis.com ^
    stackdriver.googleapis.com ^
    monitoring.googleapis.com ^
    logging.googleapis.com

anthos.googleapis.com を有効にすると、料金が発生する可能性があります。詳細については、料金ガイドをご覧ください。

Cloud Monitoring の構成

デフォルトでは、Cloud Monitoring が GKE On-Prem で有効になっています。