# Adding Clusters

In K8Studio, there are three ways of adding a cluster configuration.

1. **Add cluster by providing YAML:** If you have your YAML configuration, simply click on the plus button on the cluster manager toolbar. Once clicked, a context menu will appear. Choose the option "Add KubeConfig".

<figure><img src="/files/gbvDhMnu9ZtF6oLJnAIq" alt=""><figcaption></figcaption></figure>

A window will appear with a YAML editor. Copy and paste your cluster configuration into the editor, then click save.

<figure><img src="/files/k18NKFjXmxvWxYyOE3Bf" alt=""><figcaption></figcaption></figure>

K8 Studio will parse the provided configuration and add the clusters to the list.

2. **Add cluster by providing a configuration File(s)**\
   To add a cluster by providing a configuration file(s) in K8Studio, follow these steps<br>

   1. Click on the plus button on the main cluster manager toolbar. This will bring up a context menu.
   2. Select 'Sync File(s)'. A file explorer window will appear.
   3. Choose the file(s) that you want to import.
   4. If the configuration does not contain any errors, K8Studio will add them to the cluster list.

   \
   One significant advantage of this method is that once you add a file, K8Studio will monitor these files for changes. So, if you modify the content, K8Studio will detect the changes and synchronize with the new configuration automatically.

<figure><img src="/files/eZkTYcusiBN2LJa6eWk9" alt=""><figcaption></figcaption></figure>

3. **Add cluster by providing a configuration Folder:**\
   To add a cluster by providing a configuration folder in K8Studio, follow these steps:<br>

   1. Click on the plus button on the main cluster manager toolbar. This will bring up a context menu.
   2. Select 'Sync Folder'. A file explorer window will appear.
   3. Choose the folder that you want to import.
   4. K8Studio will read all the configuration files present within the selected folder and add these configurations to the list of available clusters in K8Studio.

   \
   One significant advantage of this method is that once you add a folder, K8Studio will monitor all the files under this folder for changes. So, if you modify the content of any of the files, K8Studio will detect the changes and synchronize with the new configuration automatically.


---

# 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://doc.k8studio.io/documentation/cluster-manager/adding-clusters.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.
