Blue-Green Model Deployment with Zero-Downtime Cutover
Advanced · 45 minutes · 5 tasks, checked automatically · 100 points
In this advanced MLOps lab you will implement a production-grade blue-green deployment strategy for a machine learning inference service on Kubernetes. You will deploy two versions of a model-serving application (blue = v1, green = v2), expose them via a shared Service selector, validate each version independently, then perform an atomic zero-downtime traffic cutover by patching the Service selector. This pattern is the foundation of safe model rollouts in production ML pipelines.
What you’ll learn
- Deploy a blue (v1) and green (v2) model-serving Deployment in a dedicated namespace with version-specific pod labels
- Expose the active model version through a single ClusterIP Service by controlling its selector, and verify traffic routing with port-forward
- Perform a zero-downtime blue-to-green cutover by atomically patching the Service selector and confirm the new model version is serving traffic
How this lab works
- Start the lab: One click starts a real Kubernetes cluster on your computer (kind), with kubectl ready in a toolbox terminal.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work reads your live cluster and says, task by task, what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Cluster: A real Kubernetes cluster on your computer (kind)
- Kubernetes: 1.34.8
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Docker Desktop installed and running
- A kind cluster created in the Kubernetes Playground
Topics: blue-green, mlops, zero-downtime, deployment-strategy, model-serving, kubernetes, service-selector, canary, rollout
Create a free account to start this lab.