2 ms·
This depends highly on the desired availability of your service and how you're shipping migrations. Some people are using init containers[0] to execute migratio
by jzelinskie 8y ago
This depends highly on the desired availability of your service and how you're shipping migrations. Some people are using init containers[0] to execute migrations before bringing up Pods in their Deployments. The deployment for Quay.io, for example, requires zero downtime, so for that a series of container images are rolled into production in order. Basically, you want different phases of the migration to have different read/write policies to new and old code-paths as you copy data into a new table. The tedious part of this is actually just writing the migration into these phases, not deploying them.
[0]: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ https://kubernetes.io/docs/concepts/workloads/pods/init-cont...