Interview Istio & Service Mesh

How do you implement a blue-green deployment using Istio?

Istio & Service Mesh · Basic level

Answer

For blue-green deployment, I keep two complete versions available and switch traffic at the routing layer. In Istio, blue and green are DestinationRule subsets or separate services, and the VirtualService points all traffic to one environment until cutover.

Technical explanation

Blue-green is simpler than a long canary when compatibility risk is low but cutover needs to be quick.

The green environment should receive smoke tests and possibly mirrored traffic before receiving real users.

Rollback is a routing change back to blue, but database migrations must be backward-compatible or explicitly rolled back.

Hands-on example

VirtualService cutover:

Before: route 100 percent to subset blue.

After validation: route 100 percent to subset green.

Rollback: reapply the previous Git revision.

Commands:

$ kubectl apply -f virtualservice-green.yaml

$ kubectl rollout status deploy/checkout-green

$ istioctl proxy-config route deploy/ingressgateway -n istio-system | grep checkout

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Istio & Service Mesh interview questions

← All Istio & Service Mesh questions