# Register Kubeadm Cluster

1. Fetch the Kubernetes config file
2. Prepare the Kubernetes config file to register the cluster in gopaddle.

{% hint style="info" %}
If you don't have a Bastion Host setup and the **server** value in your Kubernetes config points to a private IP address, do the following:

a) Change the server value to a publicly accessible Cluster API Endpoint. b) Verify that the firewall allows traffic through the Cluster API port (usually 6443 or 16443). c) Check that the Cluster certificate includes the public IP address. This guide explains how to update the certSANs with the public IP: [Adding a name to Kubernetes API server certificate](https://blog.scottlowe.org/2019/07/30/adding-a-name-to-kubernetes-api-server-certificate/).

If you don't have a Bastion Host setup and the server value in your Kubernetes config points to a domain name, make sure there is a DNS entry that correctly resolves the cluster name.If you don't have a Bastion Host setup and the server value in your Kubernetes config points to a private IP address, do the following:

a) Change the server value to a publicly accessible Cluster API Endpoint. b) Verify that the firewall allows traffic through the Cluster API port (usually 6443 or 16443). c) Check that the Cluster certificate includes the public IP address. This guide explains how to update the certSANs with the public IP: [Adding a name to Kubernetes API server certificate](https://blog.scottlowe.org/2019/07/30/adding-a-name-to-kubernetes-api-server-certificate/).

If you don't have a Bastion Host setup and the server value in your Kubernetes config points to a **domain name**, make sure there is a DNS entry that correctly resolves the cluster name.
{% endhint %}

2. Verify if Kubernetes configuration works

```
export KUBECONFIG=<path to kubeconfig>
kubectl config view
```

3. In the gopaddle UI, navigate to the **Clusters** section

4. Click on **Add a Cluster** and select **Register an existing Cluster**

5. In the Cluster registration wizard, select the **Cluster Access Method** as **Kube Config**&#x20;

6. Choose the **Cluster Provider** type as **Other**

7. In the **Authentication** Step, upload the Kubernetes config file gathered in step 1.

   <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

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>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.</p></div>

   <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>

9. Click on **Finish** to register the On-premises Cluster.

10. If you see the error - <mark style="color:red;">**Network Error !**</mark> <mark style="color:red;"></mark><mark style="color:red;">ServerError: Response not successful: Received status code 503</mark>, while view the cluster resources, then check this [troubleshooting](https://help.gopaddle.io/troubleshooting/cluster-resource-view-issues/network-error-servererror-response-not-successful-received-status-code-503) section for more information.
