Zero-Downtime Deployments with Docker Compose
maxcountryman.com
maxcountryman.com
You would declare your app in a Kubernetes Deployment load balanced by a Kubernetes Service and configure to use the Traefik ingress controller.
You would apply two deployments, one for the blue side and the other for the green side. You would use annotations for this.
Initially, the Service will be configured to only front Pods that are on the blue side.
Deploy the deployment.
When you're ready to ship a new version of the app, build a new container image and push it into your container registry. Once that's done, update the green side with the new image, then update the Service to front green Pods instead of blue ones.
The cutover will be immediate.
Kubernetes also supports other deployment models, including a Rolling deployment, which allows you to slowly bleed traffic onto new versions while keeping the old version up and scaling down appropriately.
Still like the write-up, even if not using Traefik.