Skip to main content
An upgrade replaces the image tag. The new version migrates the database when it starts, and these migrations must run once, from one pod, while no older pod is running. On Kubernetes this rules out a plain rolling update of a scaled StatefulSet.
Take a consistent backup before every upgrade, with Ayakaleaf Pro stopped. Read the release notes for steps of the version you upgrade to.
Before you start, on every node that runs Ayakaleaf Pro, pull any TeX Live image the new version or your new configuration lists, with sudo docker pull.
1

Stop Ayakaleaf Pro

2

Back up

MongoDB, from any member:
The data volume, through a short-lived pod that mounts it (it lands on the volume’s node):
Do the same for git-bridge’s volume (data-git-bridge-0), and keep a copy of the Secret overleaf-secrets. If your storage supports VolumeSnapshots, a snapshot of the volumes does the same.
3

Change the version and start

Set the new tag in 40-overleaf.yaml (and in 45-git-bridge.yaml, which must use the same tag), then:
The Deployment uses strategy: Recreate, so even a changed tag never runs two versions at once.

MongoDB and Redis

Upgrade them separately from Ayakaleaf Pro. For MongoDB, follow Updating MongoDB (one major version at a time, featureCompatibilityVersion after each step); a replica set takes the new image one member at a time when you change the image in 10-mongo.yaml, because the StatefulSet replaces mongo-2, mongo-1 and mongo-0 in turn.

Rolling back

Stop Ayakaleaf Pro as above, restore MongoDB from the archive (mongorestore --drop --archive --gzip) and the volumes or buckets from the backup, set the old tag and start again. The new version’s migrations cannot be undone otherwise.

Q&A

Answer: With podManagementPolicy: OrderedReady, overleaf-1 only starts once overleaf-0 is ready, and a rolling update does not replace a pod that never became ready. After you fixed the cause, for example a wrong setting in the ConfigMap, delete the stuck pod so that the StatefulSet creates it again from the current template:
We ran into this on our test cluster after a setting kept overleaf-0 from becoming ready; deleting the pod let all three replicas start.
Last modified on November 2, 2026