# Google

Registering a Google Account in gopaddle, provides gopaddle the required Google Account credentials to provision and manage Google GKE clusters, push or pull Docker Images to the Artifact (Docker) Registry.  Registering a Google Account is a three step process. First a role with the necessary access privileges needs to be created in the Google Cloud Console. This role is assigned to a newly created Service Account. The Service account credentials are then used to register the Google Account in the gopaddle portal.

## Pre-requisite <a href="#pre-requisite" id="pre-requisite"></a>

gopaddle uses Google's Kubernetes Engine API in order to provision and manage GKE clusters. Before registering a Google Cloud Account ensure that the API is enabled in the Google Cloud [Kubernetes Engine page](https://console.cloud.google.com/projectselector/kubernetes?_ga=2.66341549.224307538.1596556232-303781057.1596556232)

### Step-1 : Create a Role <a href="#h_e3ad8233c8" id="h_e3ad8233c8"></a>

You can create a new role either using the gcloud command line utility or from the Google Cloud Console.

1. Install gcloud utility by following the step [here](https://cloud.google.com/sdk/docs/install).
2. Download the google IAM role permissions file.

[Download IAM permissions file](https://gopaddle-marketing.s3.ap-southeast-2.amazonaws.com/gopaddle-gke-sa-iam-role.yaml)

3. Edit the gopaddle-gke-sa-iam-role.yaml file locally and change the title from **'IAM role demo'** to a desired title.
4. Login to Google Cloud Account

```
gcloud auth login
```

5. Using gcloud command-line utility, create a new role with the required permissions.

```sh
gcloud iam roles create <role-name> --project=<Project_ID> --file=<permissions-file-path>
```

When the following message pops up, type 'Y' to proceed.

```
Note: permissions [container.clusterRoles.escalate, container.namespaces.finalize, container.pods.initialize, 
container.roles.escalate] are in 'TESTING' stage which means the functionality is not mature and they can go away in 
the future. This can break your workflows, so do not use them in production systems!

Are you sure you want to make this change? (Y/n)?  Y
```

### Step -2 Creating a Service Account <a href="#h_ef2630ef4b" id="h_ef2630ef4b"></a>

1. From the Google Cloud Console,  select the top navigation bar.

<figure><img src="/files/2CgAO31Chi0QLOHZkSAJ" alt="" width="198"><figcaption></figcaption></figure>

2. Choose **API & Services** and Choose **Credentials**
3. Click on **CREATE CREDENTIALS** to create a new credential of type Service account
4. Name the Service account and choose the newly created Role to associate with the Service Account. If you have created the role using the gcloud utility, then choose the role IAM demo role.
5. Create a Key for the Service Account by clicking on CREATE KEY
6. Create a JSON file based key.
7. Save the JSON file generated

<figure><img src="https://downloads.intercomcdn.com/i/o/377480989/49a12d7f709fa93bec6f3d81/Screenshot+2021-08-18+at+6.00.53+PM.png" alt="" width="375"><figcaption></figcaption></figure>

7\. Note down the Service Account email ID.&#x20;

<figure><img src="https://downloads.intercomcdn.com/i/o/200426387/c07c96c8abaabbc324fd4e19/gp-gke-serviceaccount-details.png" alt="" width="375"><figcaption></figcaption></figure>

Note down the Google Project Name, Service Account Email ID, JSON file generated in the previous steps to register the Google Cloud Account in gopaddle.

## Registering a Google Account in gopaddle <a href="#h_cfd1d2f84e" id="h_cfd1d2f84e"></a>

1. In the gopaddle UI, navigate to the **Settings** option in the top navigation bar.
2. Select the **Cloud** and then the **Cloud Accounts** tab.
3. Click on **Add Cloud Account** to register the Google Cloud Account.
4. In the account registration wizard, choose the **Provider** as Google.
5. Provide the **Service Account Email ID**, and upload the **Service Account** JSON Key file.
6. Click on Create to **Register** the Google Cloud Account.

<figure><img src="https://downloads.intercomcdn.com/i/o/475915817/86ef8e755e07c99786e9c8b0/gopaddle-google-register.png" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.gopaddle.io/overview/provision-new-cluster/register-cloud-account/google.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
