0
0
MLOpsdevops~20 mins

Blue-green deployment for models in MLOps - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Blue-Green Deployment Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Blue-Green Deployment Basics

What is the main advantage of using a blue-green deployment strategy for machine learning models?

AIt deploys models only during off-peak hours to reduce server load.
BIt allows testing a new model version in production without downtime by switching traffic between two identical environments.
CIt automatically retrains the model using live data without human intervention.
DIt merges two different models into one to improve accuracy.
Attempts:
2 left
💡 Hint

Think about how to update a model without affecting users.

💻 Command Output
intermediate
2:00remaining
Interpreting Deployment Switch Command Output

You run a command to switch traffic from the blue environment to the green environment in your model deployment setup. What output indicates a successful switch?

MLOps
kubectl rollout status deployment/model-green
kubectl patch service model-service -p '{"spec":{"selector":{"env":"green"}}}'
A
deployment "model-green" successfully rolled out
service "model-service" patched
B
error: deployment "model-green" not found
service "model-service" patched
C
deployment "model-blue" successfully rolled out
service "model-service" patched
D
deployment "model-green" rolled out with warnings
service "model-service" patch failed
Attempts:
2 left
💡 Hint

Look for confirmation messages indicating success for both rollout and patch.

Configuration
advanced
2:00remaining
Configuring Service Selector for Blue-Green Deployment

Which Kubernetes service selector configuration correctly routes traffic to the green environment in a blue-green deployment?

MLOps
apiVersion: v1
kind: Service
metadata:
  name: model-service
spec:
  selector:
A env: green
B version: blue
C env: blue
D version: green
Attempts:
2 left
💡 Hint

The selector must match the label of the green deployment pods.

Troubleshoot
advanced
2:00remaining
Troubleshooting Traffic Not Switching in Blue-Green Deployment

After switching the service selector to the green environment, users still receive predictions from the blue model. What is the most likely cause?

AThe model code in green pods is identical to blue pods.
BThe green deployment pods crashed and are not running.
CThe service selector was not updated correctly and still points to blue pods.
DThe load balancer caches old responses and ignores the service selector.
Attempts:
2 left
💡 Hint

Check if the service selector matches the intended environment labels.

🔀 Workflow
expert
3:00remaining
Blue-Green Deployment Workflow for Model Update

Arrange the steps in the correct order for performing a blue-green deployment of a new machine learning model version.

A3,1,2,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about deploying, testing, switching traffic, then monitoring.