> For the complete documentation index, see [llms.txt](https://docs.perfectscale.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perfectscale.io/2.0-self-hosted-or-perfectscale-documentation/getting-started/provisioner-installation-with-fluxcd.md).

# Provisioner installation with FluxCD

{% hint style="warning" %}
Ensure the cluster meets the [prerequisites](/2.0-self-hosted-or-perfectscale-documentation/getting-started/cluster-prerequisites.md) before installing the provisioner with FluxCD.
{% endhint %}

## Provisioner installation with FluxCD

### Step 1: Get installation files

To install the Provisioner, you'll need the **provisioner binary**, **helmfile.yaml**, **config.yaml**, and **tenant\_id**. To obtain these files, please contact us at [sales@perfectscale.io](maito:sales@perfectscale.io).

{% hint style="info" %}
Make sure to save both the **provisioner binary,** **helmfile.yaml**, and **config.yaml** in the same directory on your system.
{% endhint %}

### Step 2: Create a dedicated namespace

Create a namespace for the on-premises installation:

```yaml
kubectl create ns <namespace_name> # replace "namespace_name" with your namespace name
```

### Step 3: Configure installation parameters

Create a *config.yaml* file in the same directory as your Binary installation file and Helmfile

<pre class="language-yaml"><code class="lang-yaml">access_key: 
secret_key: 
suffix_url: "DNS name"
tenant_id: "vendor_tenant_id" # provided by PerfectScale
namespace: &#x3C;namespace_name>
kube_context: &#x3C;k8s_cluster_context>
kube_config: &#x3C;path_to_kubeconfig_file>
<strong>helmfile: "helmfile.yaml" # provided by PerfectScale
</strong></code></pre>

### Step 4: Generate and apply the secrets

To generate the secrets, run the following command.&#x20;

```
./provisioner generate-secrets > secrets.yaml
```

{% hint style="warning" %}
For security reasons, PerfectScale does not store your secret key. We recommend you save the secrets to avoid losing them.
{% endhint %}

Apply the generated secrets in the target namespace.

```
kubectl apply -f secrets.yaml -n <namespace_name>
```

### Step 5: Generate and apply the Flux configuration file

To generate the Flux configuration file, run the following command.&#x20;

```
./provisioner generate-flux > flux.yaml
```

Once saved, apply this file and check the Pod’s status in your target namespace.

```
kubectl apply -f flux.yaml
```

### Step 6: Accessing PerfectScale WebApp UI

In order to access PerfectScale WebApp, you need to get the WebApp URL. Run the following command to retrieve the WebApp URL and get the credentials:

```yaml
./provisioner get-login
```

You now possess all the necessary data to access your PerfectScale account, including the ingress URL, username, password, etc.

## Verifying installation

1. Check the flux-system namespace and the logs of the following pods:
   * helm-controller
   * source-controller
2. Check the helm release with the following command:

```
kubectl get helmrelease -n <namespace_name>
```

{% hint style="info" %}
All the Helm releases should be in the `Ready` state.
{% endhint %}

3. Check the events of the PerfectScale pods from the target namespace. For example:

```
kubectl describe pod psc-tenant-manager -n <namespace_name>
```

If something doesn't work as expected, or you have any questions, reach out to support at <support@perfectscale.io>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.perfectscale.io/2.0-self-hosted-or-perfectscale-documentation/getting-started/provisioner-installation-with-fluxcd.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.
