I want to run database migration via a job in k8s. The database is located in a mariadb pod in the same cluster, installed through bitnami/mariadb helm chart. So I think the mariadb can be seen/exposed as a service.
How can I let migration pod connect to the mariadb pod? It seems I cannot connect to the database well in the migration pod, even if I have configured the mariadb host in the migration pod image. When I run alembic upgrade head
, it just hangs there, no any output.
Thanks!