Kubenetes configuration to quickly deploy your mastodon instance.
It's not a stable configuration and is not recommend to use in reality.
- Kubenetes on your machines
- kubectl
- Python 3
- Setup your kubenetes clusters
- Clone this repository and enter.
- Change configurations (MUST DO, see next section).
kubectl apply -k .
- Wait and look if the services run correctly.
- Look at the ports of
mastodon-web
andmastodon-streaming
, or deploymentmastodon
, setup port-forwarding and config your HTTP server to proxy. For example:
kubectl port-forward deployment/mastodon-mastodon 3000:3000
kubectl port-forward deployment/mastodon-mastodon 4000:4000
k8s-mastodon is not out of box, you must set variables to fit you needs.
-
In
kustomization.yaml
, change the database password. -
Look at
mastodon/configuration.yaml
to change configurations for mastodon. -
Save your VIPID private key and public key to files. Use
python mastodon/generate_secrets.py <path/to/private_key> <path/to/pubic_key> mastodon
in the root of the project to save secrets for mastodon. You may usenpm install web-push -g
to install web-push commandline tool and runweb-push generate-vapid-keys
to get them (NPM and NodeJS required). -
(optional) Turn to
mastodon/system-pvsize.yaml
for avaliable spaces (default is 10GiB) to save user uploaded contents. -
(optional) Turn to
smtp-gate/configuration.yaml
for email configuration if you prefer third-party server than own SMTP relay. -
(optional) Turn to
postgresql/pvsize.yaml
for the avaliable space (default is 10GiB) of database.