> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Using Kubernetes

> Deploy Ayakaleaf Pro on a Kubernetes cluster with plain manifests.

The [Toolkit](https://ayakaleaf-pro.mintlify.site/on-premises/installation/using-the-toolkit) is the recommended way to run Ayakaleaf Pro on a single server. If you already run a Kubernetes cluster, this section deploys the same container on it with plain `kubectl` manifests: no extra image, no Helm chart.

By the end of this section you have one Ayakaleaf Pro instance with sandboxed compiles, a MongoDB replica set and Redis, all in the namespace `overleaf`. To run several instances behind a load balancer, continue with [Horizontal scaling](https://ayakaleaf-pro.mintlify.site/on-premises/configuration/kubernetes/horizontal-scaling.md) afterwards.

> [!NOTE]
>
> Kubernetes support is experimental. We don't publish a Helm chart or Kubernetes-specific images. The manifests in these pages are the ones we tested on Kubernetes 1.37 (kubeadm, containerd 2.4, flannel) with three nodes of 2 vCPUs and 4 GB of memory each. Adapt storage, networking and ingress to your cluster.

### How the pieces fit

| Toolkit (one server) | Kubernetes |
| - | - |
| `config/variables.env` | ConfigMap `overleaf-env` and Secret `overleaf-secrets` |
| `sharelatex` container | Deployment `overleaf` (one pod running all Overleaf services) |
| `mongo` and `redis` containers | StatefulSets `mongo` (replica set) and `redis`, or your managed services |
| `~/overleaf-toolkit/data/overleaf` | PersistentVolumeClaim `overleaf-data` |
| Docker on the host, used for compiles | Docker Engine on every node that runs Ayakaleaf Pro |
| `bin/up`, `bin/logs`, `bin/shell` | `kubectl apply`, `kubectl logs`, `kubectl exec` |

### What you need

* A Kubernetes cluster you can install packages on: every node that may run Ayakaleaf Pro needs **Docker Engine**, because compiles run in TeX Live containers that Ayakaleaf Pro starts through the node's `/var/run/docker.sock`. See [0. Prepare the nodes](https://ayakaleaf-pro.mintlify.site/on-premises/installation/using-kubernetes/0.-prepare-the-nodes.md).
* A default StorageClass with `ReadWriteOnce` volumes.
* `kubectl` and `openssl` on your workstation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.