[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-01 UTC。"],[],[],null,["This document shows how to associate one or more Google Cloud projects with a\ncluster in Google Distributed Cloud.\n\nThe instructions here are complete. For a shorter introduction to using a\nGoogle Cloud project, see\n[Set up minimal infrastructure](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/minimal-infrastructure).\n\nBefore you begin\n\n[Install Google Cloud CLI](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/cloud-sdk).\n\nFleet host project\n\nEvery admin cluster must be registered to a\n[fleet](/anthos/fleet-management/docs).\nAnd every user cluster managed by an admin cluster must be registered to the\nsame fleet as the admin cluster.\n\nWhen an admin or user cluster is registered to a fleet, it is associated with a\n*fleet host project*. An admin cluster and all the user clusters it manages\nhave the same fleet host project. In the Google Cloud console, in the fleet host\nproject, you can see and manage your admin and user clusters.\n\nChoose a Google Cloud project to serve as your fleet host project. You can choose\nan existing project, or you can create a new one. Make a note of the project\nID. You need the ID of your fleet host project in the steps that follow.\n\nEnable APIs in your fleet host project\n\nIn your fleet host project, enable the required APIs: \n\nLinux and macOS\n\nEnable the following APIs in your fleet host project:\n\n```\ngcloud services enable --project FLEET_HOST_PROJECT_ID \\\n anthos.googleapis.com \\\n container.googleapis.com \\\n gkehub.googleapis.com \\\n gkeconnect.googleapis.com \\\n connectgateway.googleapis.com \\\n monitoring.googleapis.com \\\n kubernetesmetadata.googleapis.com \\\n logging.googleapis.com \\\n opsconfigmonitoring.googleapis.com \\\n serviceusage.googleapis.com \\\n iam.googleapis.com \\\n cloudresourcemanager.googleapis.com\n```\n\nIf you want to manage the lifecycle of clusters in the\nGoogle Cloud console, the Google Cloud CLI, or\n[Terraform](https://www.terraform.io/), enable these\nadditional APIs in your fleet host project:\n\n```\ngcloud services enable --project FLEET_HOST_PROJECT_ID \\\n gkeonprem.googleapis.com \\\n anthosaudit.googleapis.com \\\n storage.googleapis.com\n```\n\nWindows\n\nEnable the following APIs in your fleet host project:\n\n```\ngcloud services enable --project FLEET_HOST_PROJECT_ID ^\n anthos.googleapis.com ^\n container.googleapis.com ^\n gkehub.googleapis.com ^\n gkeconnect.googleapis.com ^\n connectgateway.googleapis.com ^\n monitoring.googleapis.com ^\n kubernetesmetadata.googleapis.com ^\n logging.googleapis.com ^\n opsconfigmonitoring.googleapis.com ^\n serviceusage.googleapis.com ^\n iam.googleapis.com ^\n cloudresourcemanager.googleapis.com\n```\n\nIf you want to manage the lifecycle of user clusters in the\nGoogle Cloud console, the Google Cloud CLI, or\n[Terraform](https://www.terraform.io/), enable these\nadditional APIs in your fleet host project:\n\n```\ngcloud services enable --project FLEET_HOST_PROJECT_ID ^\n gkeonprem.googleapis.com ^\n anthosaudit.googleapis.com ^\n storage.googleapis.com\n```\n\nGrant roles to service accounts on your fleet host project\n\nYour connect-register service account must be granted certain roles on your\nfleet host project. For details see\n[Connect-register service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#connect_register_service_account).\n\nYour logging-monitoring service account must be granted certain roles on your\nfleet host project. For details, see\n[Logging-monitoring service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#logging_monitoring_service_account).\n\nYour audit logging service account must be granted certain roles on your\nfleet host project. For details, see\n[Audit logging service account](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#audit_logging_service_account).\n\nRegister a cluster to a fleet\n\nYou register a cluster to a fleet when you create the cluster. The details\nof registration depend on what tool you use to create the cluster:\n\n| Tool | How to register |\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `gkectl` | Fill in the [gkeConnect.projectID](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/admin-cluster-configuration-file-latest#gkeconnect-projectid-field) field in the cluster configuration file. |\n| Google Cloud console | The cluster is automatically registered. The Google Cloud project that you use to create the cluster becomes the fleet host project. |\n| Terraform | Fill in the `project_id` field in the [.tfvars file](https://registry.terraform.io/providers/terraform-redhat/rhcs/latest/docs/guides/terraform-vars). |\n| gcloud CLI | When you call `gcloud container vmware clusters create`, provide a value for `--project`. |\n\nParent project of your component access service account\n\nBefore you create a cluster, you must have a service account that\nGoogle Distributed Cloud can use to download components from Artifact Registry.\nThis service account is called your *component access service account*.\n\nThe Google Cloud project where you created your component access service\naccount is called the *parent* of your component access service account. This\nproject can be the same as your fleet host project, or it can be different. For\nmore information about service accounts and parent projects see\n[Understanding service accounts and Google Cloud projects](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts#understanding_service_accounts_and).\n\nTo enable the required APIs for the parent project of your component access\nservice account: \n\nLinux and macOS \n\n```\ngcloud services enable --project [PARENT_PROJECT_ID] \\\n serviceusage.googleapis.com \\\n iam.googleapis.com \\\n cloudresourcemanager.googleapis.com\n```\n\nWindows \n\n```\ngcloud services enable --project [PARENT_PROJECT_ID] ^\n serviceusage.googleapis.com ^\n iam.googleapis.com ^\n cloudresourcemanager.googleapis.com\n```\n\nWhat's next\n\n[Create service accounts and keys](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/service-accounts)."]]