GitHub user ramznagc added a comment to the discussion: Migrating Apache Superset from Docker Compose to Kubernetes
For a production migration from Docker Compose to Kubernetes, I would recommend migrating the metadata database first and keeping the Superset application version unchanged during the initial move. Here are the key steps I would follow: **1. Back up the PostgreSQL metadata database** Use `pg_dump` to create a consistent backup of the existing Superset metadata database, then restore it to PostgreSQL in the Kubernetes environment. ```bash pg_dump -Fc -h SOURCE_HOST -U superset -d superset_db -f superset_backup.dump ``` Restore it into the target database: ```bash pg_restore -h TARGET_HOST -U superset -d superset_db superset_backup.dump ``` Make sure the target database is empty or prepared appropriately before restoring. **2. Preserve the Superset SECRET_KEY** Keep the same `SECRET_KEY` from your existing installation. Changing it can invalidate existing encrypted database values and sessions. Store it in a Kubernetes Secret rather than hardcoding it in a Deployment manifest. **3. Keep the Superset version and configuration consistent** Start with the same Superset version (4.1) and equivalent configuration. Verify database connectivity, authentication settings, feature flags, and custom configuration before considering an upgrade. **4. Check embedded dashboards and authentication** If you use embedded dashboards, preserve the relevant embedding configuration, allowed domains, guest-token settings, and authentication integration. Also verify that any external applications can still access the dashboards. **5. Validate before switching production traffic** Test that dashboards, datasets, charts, users, roles, permissions, and database connections are available in Kubernetes. Keep the original Compose deployment and backup available until the new environment has been verified. I would avoid combining the infrastructure migration with a Superset version upgrade. First migrate and validate the existing setup, then plan the upgrade separately. One question: are you planning to keep PostgreSQL as an external managed database, or deploy it inside the Kubernetes cluster? GitHub link: https://github.com/apache/superset/discussions/34048#discussioncomment-19335990 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
