> For the complete documentation index, see [llms.txt](https://docs.uibakery.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uibakery.io/on-premise/install-and-update/installing-on-premise-version/kubernetes.md).

# Kubernetes

## Requirements

Ensure your Kubernetes cluster meets the minimum requirements of 4 CPUs and 8 GiB of memory for this tutorial.&#x20;

You either have to run a [standalone database instance](/on-premise/install-and-update/recommendations/running-a-standalone-database-instance.md) or make sure standard `PersistentVolumeClaim` exists in your cluster.

## Installation steps

#### Step 1: Obtain UI Bakery Kubernetes Configs

UI Bakery configs are available in <https://github.com/uibakery/self-hosted> repository in `kubernetes` folder.&#x20;

You can download the repository with the following command:&#x20;

```
git clone https://github.com/uibakery/self-hosted.git
```

#### Step 2: Fill the required environment variables

By default, all variables are defined in `ui-bakery-configmap.yaml`. To run UI Bakery you need to provide the following variables:

* `UI_BAKERY_APP_SERVER_NAME` - your {server ip address}:3030, for example `http://123.123.123.123:3030;`&#x20;
* `UI_BAKERY_LICENSE_KEY` - get it from the UI Bakery team;

#### Step 3: Apply configuration on the cluster

Run `kubectl apply -f .` in the `kubernetes` folder. Please note that the application will be exposed on a public IP address on port 3030.

## Configuring UI Bakery

Once you've completed the installation steps, the UI Bakery app will be deployed on your cluster. You can sign up to test the installation. To prepare UI Bakery for production, further configuration is required.&#x20;

#### Setup standalone databases

UI Bakery comes with MySQL and Postgres databases defined in `ui-bakery-database.yaml` and `ui-bakery-internal-database.yaml`. It's recommended to migrate these databases to a managed solution or ensure they are secure and backed up. If you don't use the [Bakery Database](/extras/ui-bakery-postgres.md) feature, you can delete `ui-bakery-internal-database.yaml.`

#### Configure secrets

We recommend storing sensitive environment variables' values in Secrets instead of ConfigMap.

Use [the following guide to generate the secrets](/on-premise/install-and-update/recommendations/generate-custom-secrets.md) for the following variables:

```
UI_BAKERY_JWT_SECRET
UI_BAKERY_JWT_REFRESH_SECRET
UI_BAKERY_JWT_SERVICE_ACCOUNT_SECRET
UI_BAKERY_CREDENTIALS_SECRET
UI_BAKERY_MFA_SECRET
```

#### Configure domain name and HTTPS

After setting up Ingress, update `UI_BAKERY_APP_SERVER_NAME` environment variable to `https://yourdomain.com`.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uibakery.io/on-premise/install-and-update/installing-on-premise-version/kubernetes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
