# Gke Cluster Management

Platform9 can connect to Google Cloud and import existing GKE clusters, bringing them under management of Platform9 to enable centralized administration. Once a cluster has been imported and the [auto$](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/external-cluster-operator/README.md) has been installed Platform9 enables:

* View GKE clusters alongside [BareOS](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/bareos-what-is-bareos/README.md), [Azure Native Clusters](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/azure-prerequisites/README.md) and [AWS Native Clusters](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/aws-prerequisites/README.md)
* View and Edit RBAC configurations
* View and Manage Cluster Workloads
* Use the Application Catalog to deploy Helm 3 applications
* Deploy Platform9 Monitoring

{% hint style="warning" %}
**IAM User Role/Group**

Platform9 requires that the service principal that was used to create the Cloud Provider must have access to the GKE Cluster as an Google Cloud Kubernetes Service Cluster Admin Role. To validate IAM access download [auto$](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/cloud-provider-iam-check/README.md) CLI
{% endhint %}

## Import an GKE Cluster

To import a GKE cluster, clients must first create a service account for Platform9 in Google Cloud, and then export and download the account's JSON Key. The service account must have access to each cluster with `Kubernetes Engine Admin: roles/container.admin`permissions. Clients can then create a Google Cloud Provider within Platform9.

Once the Cloud provider has been added, clients can import any GKE cluster that the Service Account has access to.

To import a GKE Cluster, follow these steps:

1. Within Google Cloud, create a [Google Cloud Service Account](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/google-cloud-prerequisites/README.md) for Platform9
2. Grant the [Service Account container admin permissions](https://cloud.google.com/kubernetes-engine/docs/how-to/iam)
3. Log into Platform9 and navigate to the Infrastructure ⇾ Cloud Providers tab
4. On the Cloud Providers tab, click '+ Add Cloud Provider'
5. Next, provide a Name for the Cloud Provider and the JSON file for the Google Service Account
6. Once the Cloud Provider has been validated, clients can save the credentials to Platform9
7. Now, navigate to the Infrastructure ⇾ Clusters tab and select 'Import' from the 'Add Cluster' button
8. Then, select Google Cloud as the target cloud and click 'Import GKE Cluster'
9. Select the Cloud Provider configured with GKE Cluster Access and click 'Next'
10. Next, select each region where the GKE clusters are running and select each cluster to be imported. Several clusters can be imported in one action. Once all clusters are selected, click next.
11. Review the final list for import and click 'Import'
    1. IMPORTANT: [ECO ](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/external-cluster-operator/README.md)must be installed into each cluster after import to ensure that Platform9 can communicate with the clusters API server
12. Install ECO for each imported cluster


---

# 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://docs.platform9.com/managed-kubernetes/5.9/google-cloud-prerequisites/gke-cluster-management.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.
