<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.9 </button>

- [Latest version](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/latest/how-to/cloud-project-quickstart)
- [Version 1.16](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.16/how-to/cloud-project-quickstart)
- [Earlier versions (unsupported)](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/latest/version-history#expandable-1)

<br />

This document shows how to set up a Google Cloud project and grant roles to a
Google Account.

The instructions here are part of a quickstart. For full instructions on using
Google Cloud projects with Google Distributed Cloud, see
[Using multiple Google Cloud projects](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.9/how-to/multiple-gcp-projects).

## Before you begin

Read the [Google Distributed Cloud overview](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.9/overview).

[Install the Google Cloud CLI](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.9/how-to/cloud-sdk).

## Choose or create a Google Cloud project

An GKE cluster on VMware must be associated with one or more
Google Cloud projects. This quickstart uses only one Google Cloud project.
You can use an existing Google Cloud project or you can
[create a new Google Cloud project](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects).
Make a note of your
[project ID](https://docs.cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects).

## Enable services in your Google Cloud project

Your Google Cloud project must have the following services enabled:

```
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
opsconfigmonitoring.googleapis.com
monitoring.googleapis.com
logging.googleapis.com
```

To enable services in a project, you must have certain permissions on your
Google Cloud project. For details, see the required permissions for
`services.enable` in [Access control](https://docs.cloud.google.com/service-usage/docs/access-control).

If you have the required permissions, you can enable the services yourself.
Otherwise, someone else in your organization must enable the services for you.

To enable the required services:

### Linux and macOS

```
gcloud services enable --project=PROJECT_ID \
    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 \
    opsconfigmonitoring.googleapis.com \
    monitoring.googleapis.com \
    logging.googleapis.com
```

### Windows

```
gcloud services enable --project=PROJECT_ID ^
    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
```

Enabling `anthos.googleapis.com` might incur charges. See the
[Pricing](https://cloud.google.com/anthos/pricing) guide for details.

## Log in

The `gkeadm` command-line tool uses your SDK `account`
[property](https://docs.cloud.google.com/sdk/docs/properties) to create service accounts. So it is important
that you set your SDK `account` property before you run `gkeadm` to create an
admin workstation.

Log in with any Google Account. This sets your SDK `account` property:

```
gcloud auth login
```

Verify that your SDK `account` property is set correctly:

```
gcloud config list
```

The output shows the values of your SDK `account` property.
For example:

```
[core]
account = my-name@google.com
disable_usage_reporting = False
Your active configuration is: [default]
```

## Grant roles to your SDK account

The Google Account that is set as your SDK `account` property must have these
[IAM roles](https://docs.cloud.google.com/iam/docs/overview) so that `gkeadm` can create and
manage service accounts for you:

- `resourcemanager.projectIamAdmin`
- `serviceusage.serviceUsageAdmin`
- `iam.serviceAccountCreator`
- `iam.serviceAccountKeyAdmin`

To grant roles, you must have certain permissions on your
Google Cloud project. For details, see
[Granting, changing, and revoking access to resources](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access).

If you have the required permissions, you can grant the roles yourself.
Otherwise, someone else in your organization must grant the roles for you.

To grant the roles:

### Linux and macOS

```
gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="user:ACCOUNT" \
    --role="roles/resourcemanager.projectIamAdmin"

gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="user:ACCOUNT" \
    --role="roles/serviceusage.serviceUsageAdmin"

gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="user:ACCOUNT" \
    --role="roles/iam.serviceAccountCreator"

gcloud projects add-iam-policy-binding PROJECT_ID \
    --member="user:ACCOUNT" \
    --role="roles/iam.serviceAccountKeyAdmin"
```

### Windows

```
gcloud projects add-iam-policy-binding PROJECT_ID ^
    --member="user:ACCOUNT" ^
    --role="roles/resourcemanager.projectIamAdmin"

gcloud projects add-iam-policy-binding PROJECT_ID ^
    --member="user:ACCOUNT" ^
    --role="roles/serviceusage.serviceUsageAdmin"

gcloud projects add-iam-policy-binding PROJECT_ID ^
    --member="user:ACCOUNT" ^
    --role="roles/iam.serviceAccountCreator"

gcloud projects add-iam-policy-binding PROJECT_ID ^
    --member="user:ACCOUNT" ^
    --role="roles/iam.serviceAccountKeyAdmin"
```

Replace the following:

- `PROJECT_ID`: the ID of your Google Cloud project
- `ACCOUNT`: the value of your SDK `account` property

## What's next

[Create a service account (quickstart)](https://docs.cloud.google.com/anthos/clusters/docs/on-prem/1.9/how-to/service-account-quickstart)