# Migrating from Docker Compose-based installation to Kubernetes

**URL:** <https://forum.gitea.com/t/migrating-from-docker-compose-based-installation-to-kubernetes/6286>\
**Category:** Install/Maintain/Configure\
**Created:** [November 18, 2022, 11:09pm UTC](https://forum.gitea.com/t/migrating-from-docker-compose-based-installation-to-kubernetes/6286 "2022-11-18T23:09:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmm7425](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@lmm7425](https://forum.gitea.com/u/lmm7425)\
**Post date:** [November 18, 2022, 11:09pm UTC](https://forum.gitea.com/t/migrating-from-docker-compose-based-installation-to-kubernetes/6286/1 "2022-11-18T23:09:07Z")

</div>

I run Gitea in Docker Compose, with Postgres running on a separate VM (my Gitea config points to the Postgres DB).

I’d like to move from Docker to K3s (a kubernetes distribution). What is the best way to do this? I’m thinking I’d use the [helm chart](https://gitea.com/gitea/helm-chart):

1. Use [external database](https://gitea.com/gitea/helm-chart#external-database) to specify my database connection info
2. Use [ENV\_TO\_INI](https://gitea.com/gitea/helm-chart#user-defined-environment-variables-in-app-ini) to specify the rest of my settings
3. Install (this would be done via Flux CD)
4. After the volume is created, rsync my git repos from the docker volume to the K3s volume
5. ???

Because I’m keeping the same DB, all my users, webhooks, API keys, etc… would be the same…

---

<div class="post-metadata">

**Author:** ![pat-s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/pat-s/32/1057_2.png) [@pat-s](https://forum.gitea.com/u/pat-s)\
**Post date:** [May 29, 2023, 8:36am UTC](https://forum.gitea.com/t/migrating-from-docker-compose-based-installation-to-kubernetes/6286/2 "2023-05-29T08:36:39Z")

</div>

Should work without issues, yes. Only manual step would be to rsync your “data” directory to the new volume in k3s.
