Docker → Kubernetes
If you run goloom with Docker and an external PostgreSQL database and want to move to Kubernetes — for example a homelab cluster with CloudNativePG (CNPG) — the migration is mostly about moving data and configuration, since goloom itself is a single binary.
Before you start
Section titled “Before you start”- A reachable PostgreSQL target in the cluster (e.g. a CNPG cluster).
- Your existing
ENCRYPTION_KEY— you must reuse the exact same value, or encrypted provider tokens cannot be decrypted. - A backup of your current database.
Outline
Section titled “Outline”- Provision PostgreSQL in Kubernetes (e.g. a CNPG
Cluster). - Migrate data from your current Postgres into the new database (dump and restore).
- Deploy goloom as a
Deployment+Service, configured with:DATABASE_URLpointing at the in-cluster Postgres.- the same
ENCRYPTION_KEYas before (via aSecret). PUBLIC_BASE_URLset to the public URL behind your ingress.
- Expose it through an Ingress / Gateway with TLS.
- Verify with
GET /healthzand a test login before cutting over DNS.
Configuration parity
Section titled “Configuration parity”Keep the same environment configuration you used under Docker — see
configuration. The main differences are
where secrets and config come from (Kubernetes Secret/ConfigMap) rather
than a .env file.