Great writeup.

How do you handle database migrations when using an otherwise automated CI/CD flow with gradual deployment?

You can use any normal DB migration tool. For k8s, I put the app's readiness probe to false, run the migrations and then toggle the probe back to true.

Here are some migration libraries:

Go - https://github.com/golang-migrate/migrate

Node - https://github.com/salsita/node-pg-migrate