Recall & Review
beginner
What is a blue-green deployment?
A blue-green deployment is a method to release software by running two identical environments called 'blue' and 'green'. One serves live traffic while the other is updated. After testing, traffic switches to the updated environment, reducing downtime and risk.
Click to reveal answer
beginner
Why use blue-green deployments in Kubernetes?
Blue-green deployments help avoid downtime and reduce errors by switching traffic between two environments. Kubernetes can manage these environments using services and labels to route traffic smoothly.
Click to reveal answer
intermediate
How does Kubernetes route traffic in a blue-green deployment?
Kubernetes uses Services with selectors that match labels on Pods. By changing the Service's selector from blue to green Pods, traffic shifts instantly without downtime.
Click to reveal answer
intermediate
What is a common risk if blue-green deployments are not done properly?
If traffic is switched before the new environment is fully tested, users may face errors or downtime. Also, keeping both environments can double resource use temporarily.
Click to reveal answer
intermediate
Give a simple example of switching traffic in Kubernetes for blue-green deployment.
You can update the Service selector from 'app: blue' to 'app: green'. For example: kubectl patch service my-service -p '{"spec":{"selector":{"app":"green"}}}'. This moves traffic to green Pods.
Click to reveal answer
What is the main goal of blue-green deployments?
✗ Incorrect
Blue-green deployments aim to reduce downtime by switching traffic between two identical environments.
In Kubernetes, how do you switch traffic from blue to green environment?
✗ Incorrect
Changing the Service selector labels routes traffic to the new environment without downtime.
Which Kubernetes object is primarily used to route traffic in blue-green deployments?
✗ Incorrect
Services route traffic to Pods based on labels, enabling blue-green deployment traffic switching.
What is a downside of blue-green deployments?
✗ Incorrect
Running two environments at once uses more resources temporarily.
What should you do before switching traffic to the green environment?
✗ Incorrect
Testing ensures the new environment works well before users access it.
Explain how blue-green deployments reduce downtime in Kubernetes.
Think about how traffic moves between two sets of pods.
You got /4 concepts.
Describe the steps to perform a blue-green deployment in Kubernetes.
Consider the lifecycle from deployment to cleanup.
You got /5 concepts.