2020-06-29 11:58:48 +00:00
|
|
|
|
# Introduction
|
|
|
|
|
|
|
|
|
|
This is a [Helm](https://helm.sh/) chart for installing Mastodon into a
|
|
|
|
|
Kubernetes cluster. The basic usage is:
|
|
|
|
|
|
2021-02-15 07:00:54 +00:00
|
|
|
|
1. edit `values.yaml` or create a separate yaml file for custom values
|
|
|
|
|
1. `helm dep update`
|
|
|
|
|
1. `helm install --namespace mastodon --create-namespace my-mastodon ./ -f path/to/additional/values.yaml`
|
2020-06-29 11:58:48 +00:00
|
|
|
|
|
2024-03-12 13:50:27 +00:00
|
|
|
|
This chart is tested with k8s 1.21+ and helm 3.8.0+.
|
2020-06-29 11:58:48 +00:00
|
|
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
|
|
The variables that _must_ be configured are:
|
|
|
|
|
|
2021-02-15 07:00:54 +00:00
|
|
|
|
- password and keys in the `mastodon.secrets`, `postgresql`, and `redis` groups; if
|
2020-06-29 11:58:48 +00:00
|
|
|
|
left blank, some of those values will be autogenerated, but will not persist
|
|
|
|
|
across upgrades.
|
|
|
|
|
|
2021-02-15 07:00:54 +00:00
|
|
|
|
- SMTP settings for your mailer in the `mastodon.smtp` group.
|
2020-06-29 11:58:48 +00:00
|
|
|
|
|
2022-12-03 04:44:39 +00:00
|
|
|
|
If your PersistentVolumeClaim is `ReadWriteOnce` and you're unable to use a S3-compatible service or
|
|
|
|
|
run a self-hosted compatible service like [Minio](https://min.io/docs/minio/kubernetes/upstream/index.html)
|
|
|
|
|
then you need to set the pod affinity so the web and sidekiq pods are scheduled to the same node.
|
|
|
|
|
|
|
|
|
|
Example configuration:
|
|
|
|
|
```yaml
|
|
|
|
|
podAffinity:
|
|
|
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
|
|
|
- labelSelector:
|
|
|
|
|
matchExpressions:
|
|
|
|
|
- key: app.kubernetes.io/part-of
|
|
|
|
|
operator: In
|
|
|
|
|
values:
|
|
|
|
|
- rails
|
|
|
|
|
topologyKey: kubernetes.io/hostname
|
|
|
|
|
```
|
|
|
|
|
|
2022-11-05 20:19:25 +00:00
|
|
|
|
# Administration
|
|
|
|
|
|
|
|
|
|
You can run [admin CLI](https://docs.joinmastodon.org/admin/tootctl/) commands in the web deployment.
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
kubectl -n mastodon exec -it deployment/mastodon-web -- bash
|
|
|
|
|
tootctl accounts modify admin --reset-password
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
or
|
|
|
|
|
```bash
|
|
|
|
|
kubectl -n mastodon exec -it deployment/mastodon-web -- tootctl accounts modify admin --reset-password
|
|
|
|
|
```
|
|
|
|
|
|
2020-06-29 11:58:48 +00:00
|
|
|
|
# Missing features
|
|
|
|
|
|
|
|
|
|
Currently this chart does _not_ support:
|
|
|
|
|
|
|
|
|
|
- Hidden services
|
|
|
|
|
- Swift
|
|
|
|
|
|
|
|
|
|
# Upgrading
|
|
|
|
|
|
|
|
|
|
Because database migrations are managed as a Job separate from the Rails and
|
|
|
|
|
Sidekiq deployments, it’s possible they will occur in the wrong order. After
|
|
|
|
|
upgrading Mastodon versions, it may sometimes be necessary to manually delete
|
|
|
|
|
the Rails and Sidekiq pods so that they are recreated against the latest
|
|
|
|
|
migration.
|