# Aks Cluster Management

Platform9 can easily connect to Azure and import existing AKS clusters, bringing them under management of Platform9 to enable centralized administration. Once a cluster has been imported and the [External Cluster Operator](https://platform9.com/docs/kubernetes/external-cluster-operator) has been installed Platform9 enables:

* View AKS 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 configuration
* 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 AKS Cluster as an Azure 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 AKS Cluster

To import an AKS cluster, clients must first create a Service Principal for Platform9 in Azure and grant the Service Principal access to each AKS cluster. Once the Service Principal is set up correctly, clients can then create an Azure Cloud Provider within Platform9. Once the Cloud provider has been added, clients can import any AKS cluster that the Service Principal has access to.

#### Steps to Import an AKS Cluster

1. Within Azure, [Create a Service Principal with Contributor Role ](https://github.com/platform9/pcd-docs-gitbook/blob/main/kubernetes/azure-prerequisites/README.md)for Platform9
2. Grant the Service Principal [access to each AKS cluster](https://docs.microsoft.com/en-us/azure/aks/concepts-identity)
3. Log into Platform9 and navigate to Infrastructure ⇾ Cloud Providers tab
4. On the Cloud Providers tab, click “+ Add Cloud Provider”
5. Then, provide a Name for the Cloud Provider and the Azure account details for the Service Principal and click next
6. Once the Cloud Provider has been validated, clients can save the credentials to Platform9
7. Validate the Cloud Provider has access to the regions you are running the AKS clusters in, and then click 'Done'
8. Next, navigate to the Infrastructure ⇾ Clusters tab and select 'Import' from the Add Cluster button
9. Select Azure as the target cloud and click 'Import AKS Cluster'
10. Select the Cloud Provider configured with AKS Cluster Access and click 'Next'
11. Select each region where the AKS clusters are running, and then select each cluster to be imported. Several clusters can be imported in one action. Once all clusters are selected, click 'Next'
12. Review the final list for import and click 'Import'
13. ```
    1. IMPORTANT: [ECO ](/kubernetes/external-cluster-operator) must be installed into each cluster after import to ensure that Platform9 can communicate with the clusters API server
    ```
14. 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.7/aks-clusters/aks-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.
