This message was deleted.
# kubernetes
s
This message was deleted.
a
Few different ways you could approach this. You could (this is a basic example) use a
PostStart
hook on the PostgreSQL container in the Pod that waits for Postgres to become available, then loads the SQL dump. Then have the Flask container
readiness
check wait for the data to be imported before allowing request through (not the best way) Other (simple) way you could do it is use 2 Pods (1 for Postgres, 1 for Flask) and use an
initContainer
in the Flask Pod that waits for Postgres to become available, then loads the SQL dump in it's entirety before Flask starts. (there are various different/better ways to do it, but those might be sufficient?)
a
Thanks so much, I used the
scripts
approach to solve, i also had to run the different applications in separate pods