# Register Azure AKS Cluster

1. In order to register an Azure Cluster, you must first register the Azure Cloud Account in gopaddle. Follow [these](https://app.gitbook.com/o/kaNNkk5MWdImsh5Ur4MO/s/5QxXxCob5M5VXQJTryRc/~/changes/7/provision-multi-cloud-clusters/register-cloud-account/azure) steps to register the Azure Cloud Account.
2. Download and install Azure CLI by following [these](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli) steps.
3. Login to Azure account and get the KubeConfig to access the cluster:

```sh
az login
az account set --subscription <subscription-id>
KUBECONFIG=./aks.config az aks get-credentials --resource-group <resource-group-name> --name <azure-cluster-name> --overwrite-existing
```

{% hint style="info" %}
If you don't have a Bastion Host setup, and if the **`server`** value in the Kubeconfig points to a private IP address:

a) Replace the **`server`** value to a publicly accessible Cluster Master API Endpoint

b) Make sure the firewall is open for the Cluster Master API port

c) Make sure the Cluster certificate is attached to the Public IP. Here is an example of how to update the certSANs with the public IP. - <https://blog.scottlowe.org/2019/07/30/adding-a-name-to-kubernetes-api-server-certificate/>
{% endhint %}

3. In the gopaddle UI, navigate to the **Environments** section and click on **Add a Cluster**.
4. Choose **Register an existing Cluster**
5. Provide the cluster name. The cluster name must match the AKS Cluster name in the azure portal.
6. Select the **Cloud Provider** as **Azure**
7. Select the **Azure Cloud Account** registered in step 1 and Provide the **Subscription ID** and the **Resource Group Name**

<figure><img src="https://234395929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5QxXxCob5M5VXQJTryRc%2Fuploads%2FDC5mLYJEZoL4Mg5dnmos%2Fregister-azure.png?alt=media&#x26;token=cf1f6a6b-0f29-47a1-bf5a-94b1ce272cd4" alt=""><figcaption><p>Register Azure AKS Cluster in gopaddle</p></figcaption></figure>

8. In the **Authentication** Step, upload the Kubeconfig file gathered in step 2.

<figure><img src="https://234395929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5QxXxCob5M5VXQJTryRc%2Fuploads%2ForsUeftiQosV8yii9FrM%2Fregister-cluster-authentication.png?alt=media&#x26;token=fe7ee227-c530-4855-8862-540d53f8b6bc" alt=""><figcaption><p>Upload the Kubeconfig file</p></figcaption></figure>

8. If you have configured a bastion host, provide the Bastion Host IP, SSH Pem file, SSH port

{% hint style="info" %}
If you are using a Bastion Host setup, make sure the Bastion Host IP and Port are accessible publicly. If you are looking for a private only setup, get in touch with us to  explore gopaddle Enterprises.
{% endhint %}

<figure><img src="https://234395929-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5QxXxCob5M5VXQJTryRc%2Fuploads%2FdaVEz4heTemMf08hbHlx%2Fregister-cluster-bastion.png?alt=media&#x26;token=b4bb4be2-375b-43c8-8ce7-d77fff28f23a" alt=""><figcaption><p>Provide the Bastion Host Connection Details</p></figcaption></figure>

8. Click on **Finish** to register the AKS Cluster.

<br>
