{"id":22154622,"url":"https://github.com/ericflo/kube-mastodon","last_synced_at":"2025-10-16T19:47:06.445Z","repository":{"id":53345266,"uuid":"140126324","full_name":"ericflo/kube-mastodon","owner":"ericflo","description":"This repository contains everything you need to get a Mastodon server running on Kubernetes.","archived":false,"fork":false,"pushed_at":"2018-12-12T23:11:51.000Z","size":6,"stargazers_count":27,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T14:18:38.067Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericflo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-08T00:29:08.000Z","updated_at":"2024-03-18T15:46:22.000Z","dependencies_parsed_at":"2022-09-03T04:21:22.657Z","dependency_job_id":null,"html_url":"https://github.com/ericflo/kube-mastodon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericflo%2Fkube-mastodon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericflo%2Fkube-mastodon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericflo%2Fkube-mastodon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericflo%2Fkube-mastodon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericflo","download_url":"https://codeload.github.com/ericflo/kube-mastodon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252691,"owners_count":21072701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T01:49:57.706Z","updated_at":"2025-10-16T19:47:06.350Z","avatar_url":"https://github.com/ericflo.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"kube-mastodon\r\n=============\r\n\r\nThis repository contains everything you need to get a Mastodon server running on Mastodon 2.5.0.\r\n\r\n\r\nUpgrading from 2.4.2\r\n--------------------\r\n\r\nUpgrade the checkout of this repo:\r\n\r\n```\r\ngit pull origin master\r\n```\r\n\r\nReplace the new deployments:\r\n\r\n```\r\nkubectl replace -f deploy/web-deployment.yml\r\nkubectl replace -f deploy/streaming-deployment.yml\r\nkubectl replace -f deploy/sidekiq-deployment.yml\r\n```\r\n\r\nWait a minute or so for these to redeploy...\r\n\r\nNow run a database upgrade by connecting to the new pod:\r\n\r\n```\r\nexport MASTODON_POD=$(kubectl get pods -l app=mastodon-web -o jsonpath='{.items[0].metadata.name}')\r\nkubectl exec $MASTODON_POD  -i -t -- bash -il\r\n```\r\n\r\nAnd once you're connected:\r\n\r\n```\r\n$ RAILS_ENV=production bundle exec rails db:migrate\r\n```\r\n\r\nYou're all set - things should be upgraded now!\r\n\r\n\r\nDeployment\r\n----------\r\n\r\nCopy the template files to their proper places:\r\n\r\n```\r\ncp deploy/ingress.yml.template deploy/ingress.yml\r\ncp deploy/secret.yml.template deploy/secret.yml\r\n```\r\n\r\nNow fill in the proper values for those files.\r\n\r\nThen deploy everything else:\r\n\r\n```\r\nkubectl create -f deploy/config.yml\r\nkubectl create -f deploy/secret.yml\r\n\r\nkubectl create -f deploy/postgres-volume-claim.yml\r\nkubectl create -f deploy/postgres-deployment.yml\r\nkubectl create -f deploy/postgres-service.yml\r\n\r\nkubectl create -f deploy/redis-volume-claim.yml\r\nkubectl create -f deploy/redis-deployment.yml\r\nkubectl create -f deploy/redis-service.yml\r\n\r\nkubectl create -f deploy/web-deployment.yml\r\nkubectl create -f deploy/web-service.yml\r\n\r\nkubectl create -f deploy/streaming-deployment.yml\r\nkubectl create -f deploy/streaming-service.yml\r\n\r\nkubectl create -f deploy/sidekiq-deployment.yml\r\n\r\nkubectl create -f deploy/ingress.yml\r\nkubectl create -f deploy/external-dns.yml\r\n```\r\n\r\nNow look up the pod name for the web container:\r\n\r\n```\r\nkubectl get pods\r\n```\r\n\r\nFinally, connect to the web pod so we can set up the database\r\n(use the pod name from before):\r\n\r\n```\r\nexport MASTODON_POD=$(kubectl get pods -l app=mastodon-web -o jsonpath='{.items[0].metadata.name}')\r\nkubectl exec $MASTODON_POD  -i -t -- bash -il\r\n```\r\n\r\nOnce you're connected, run this command to set up the db,\r\nbut don't disconnect.\r\n\r\n```\r\n$ RAILS_ENV=production bundle exec rails db:migrate\r\n```\r\n\r\nNow in the same session, generate VAPID keys:\r\n```\r\n$ RAILS_ENV=production bundle exec rake mastodon:webpush:generate_vapid_key\r\n```\r\n\r\nFinally update your secret with the VAPID keys, and replace the secret:\r\n```\r\nkubectl replace -f deploy/secret.yml\r\n```\r\n\r\nYou may need to kill your streaming, sidekiq, and web pods to get the new env vars.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericflo%2Fkube-mastodon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericflo%2Fkube-mastodon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericflo%2Fkube-mastodon/lists"}