Skip to main content

Stopping and starting MintPress

If you want to save compute resources when MintPress is not in use, you can stop the MintPress deployments and statefulsets. The Kubernetes topology reference lists the deployments and stateful sets an installation contains.

MintPress provides a script to help with start and stopping its resources. The script requires jq to be installed on your system and can be downloaded from this documentation with:

mkdir -p $HOME/bin
curl -L https://docs.mintpress.io/files/downloads/manage-mintpress.sh -o $HOME/bin/manage-mintpress

And make it executable:

chmod +x $HOME/bin/manage-mintpress

With the script in place, you can stop MintPress by running:

manage-mintpress ${KUBERNETES_NAMESPACE} stop

And start it again by running:

manage-mintpress ${KUBERNETES_NAMESPACE} start
warning

The script will scale down all the deployments, statefulsets and the database cluster in the provided namespace, making the MintPress instance unavailable until it is started again. Note that if there are any changes in progress, it might take some time for all the pods to be removed.

Since the database cluster is scaled down, no replication will be performed until the instance is started again.

Hibernating and resuming the database

The stop and start actions affect the whole instance — they scale all the deployments and statefulsets and toggle database hibernation. If you only want to hibernate the database while leaving the other workloads running, use the hibernate and resume actions instead.

To hibernate only the database, run:

manage-mintpress ${KUBERNETES_NAMESPACE} hibernate

This toggles the cnpg.io/hibernation annotation on the database cluster, hibernating the database without affecting the API, workers or any other workloads.

To resume only the database, run:

manage-mintpress ${KUBERNETES_NAMESPACE} resume

This toggles the cnpg.io/hibernation annotation off, resuming the database.

note

Unlike stop and start, which scale all workloads and toggle database hibernation, hibernate and resume affect only the database. The other workloads keep running.

Stopping K3s

If you want to save more compute resources, you can stop K3s when not in use. Stopping K3s does not delete any persistent volumes.

The systemctl stop k3s command will stop the K3s service.

caution

Do not stop K3s whilst steps and changes are being executed in MintPress.

Starting K3s

If the systemctl stop k3s command has been used to stop K3s, then the systemctl start k3s command can be used to start it again.