> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.18.1/deployment/installation/kubernetes/prerequisites.md).

# Prerequisites

Prepare your workstation, the Kubernetes cluster, and the settings file for the WProofreader stack.

Do these steps before you install the WProofreader stack on Kubernetes.

### What you need

* A Kubernetes cluster, version 1.27 or later.
* Permission to create a namespace and resources in that namespace.
* A workstation with `kubectl`, Helm 3.15 or later, `git`, and `openssl`.
* A WProofreader license ticket ID.
* Outbound internet access from the cluster. WProofreader Server uses it to activate the license. See [Internet connectivity requirements](/v6.18.1/deployment/installation-requirements/internet-connectivity-requirements.md).
* Access from the cluster to Docker Hub or to your container registry. The stack uses the `webspellchecker/wproofreader`, `webspellchecker/db-manager`, `webspellchecker/admin-panel`, and `mysql` images. The public `webspellchecker/wproofreader` image is for evaluation only. For production, use your own WProofreader Server image. See [Use your own WProofreader Server image](/v6.18.1/deployment/installation/kubernetes/install-wproofreader-server.md#use-your-own-wproofreader-server-image).
* Enough CPU and memory for WProofreader Server. See [Hardware requirements](/v6.18.1/deployment/installation-requirements/hardware-requirements.md).

### Prepare your workstation and the cluster

{% stepper %}
{% step %}

#### Check the tools

```bash
kubectl version --client
helm version --short
git --version
openssl version
```

Each command shows a version. Helm must show version 3.15 or later.
{% endstep %}

{% step %}

#### Select the cluster

```bash
kubectl config current-context
```

Make sure that the command shows the cluster where you want to install the stack.
{% endstep %}

{% step %}

#### Create the namespace

All components of the stack use the `wsc` namespace.

```bash
kubectl create namespace wsc
```

If the namespace exists, the command shows `AlreadyExists`. You can continue.
{% endstep %}

{% step %}

#### Check your permissions

The charts and the commands in this guide use these resource types:

```bash
kubectl auth can-i create configmaps --namespace wsc
kubectl auth can-i create pods --namespace wsc
kubectl auth can-i create secrets --namespace wsc
kubectl auth can-i create services --namespace wsc
kubectl auth can-i create serviceaccounts --namespace wsc
kubectl auth can-i create persistentvolumeclaims --namespace wsc
kubectl auth can-i create deployments.apps --namespace wsc
kubectl auth can-i create statefulsets.apps --namespace wsc
kubectl auth can-i create jobs.batch --namespace wsc
kubectl auth can-i create roles.rbac.authorization.k8s.io --namespace wsc
kubectl auth can-i create rolebindings.rbac.authorization.k8s.io --namespace wsc
```

Each command must show `yes`.

If you will use an Ingress, also run this command:

```bash
kubectl auth can-i create ingresses.networking.k8s.io --namespace wsc
```

If you will use the Gateway API, install its custom resource definitions first. Then run this command:

```bash
kubectl auth can-i create httproutes.gateway.networking.k8s.io --namespace wsc
```

The command for the routing method that you select must show `yes`.
{% endstep %}

{% step %}

#### Create a work directory

The next pages use files in this directory. Run all commands from it.

```bash
mkdir -p ~/wproofreader-k8s
cd ~/wproofreader-k8s
```

{% endstep %}

{% step %}

#### Download the Helm charts

```bash
git clone https://github.com/WebSpellChecker/wproofreader-helm.git
git clone https://github.com/WebSpellChecker/admin-panel-helm.git
git clone https://github.com/WebSpellChecker/mysql-server-helm.git
```

You need `mysql-server-helm` only if you install MySQL in the cluster. See [Prepare MySQL](/v6.18.1/deployment/installation/kubernetes/prepare-mysql.md).

The commands create the `wproofreader-helm`, `admin-panel-helm`, and `mysql-server-helm` directories.
{% endstep %}

{% step %}

#### Create the settings file

This command creates the `wsc-stack.env` file. The file contains new random passwords, an application key for Admin-panel, and a placeholder for your license ticket ID.

```bash
(
umask 077
cat > wsc-stack.env <<EOF
export WPR_LICENSE_TICKET_ID='<license_ticket_id>'
export MYSQL_ADMIN_USER='root'
export MYSQL_ADMIN_PASSWORD='$(openssl rand -hex 16)'
export ADMIN_PANEL_DB_PASSWORD='$(openssl rand -hex 16)'
export APPSERVER_DB_PASSWORD='$(openssl rand -hex 16)'
export SERVICE_DB_PASSWORD='$(openssl rand -hex 16)'
export APP_KEY='base64:$(openssl rand -base64 32)'
EOF
)
```

Open `wsc-stack.env` in a text editor. Replace `<license_ticket_id>` with your license ticket ID. Save the file.

{% hint style="warning" %}
The file contains passwords. Keep a copy in your password manager. Do not change `APP_KEY` after you install Admin-panel.

If you change `APP_KEY`, users lose their sessions and Admin-panel cannot read encrypted data.
{% endhint %}

{% hint style="info" %}
This guide creates Kubernetes Secrets from the settings file. For production, create the Secrets with your secret-management system.

Use the Secret names and keys in this guide. You can then use the Helm commands without changes.
{% endhint %}
{% endstep %}

{% step %}

#### Load the settings

```bash
source wsc-stack.env
test "$WPR_LICENSE_TICKET_ID" != '<license_ticket_id>' && \
  echo 'License ticket ID is set.'
```

The command shows `License ticket ID is set.`

{% hint style="info" %}
The settings stay in the current terminal only. If you open a new terminal, go to `~/wproofreader-k8s` and run `source wsc-stack.env` again.
{% endhint %}
{% endstep %}
{% endstepper %}

### Next step

[Prepare MySQL](/v6.18.1/deployment/installation/kubernetes/prepare-mysql.md)
