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 checkoutCheck 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
- What are subsets in a DestinationRule, and how are they used?
- How do you do weighted traffic splitting for a canary release in Istio?
- How does Istio do request routing based on headers or paths?
- What is fault injection in Istio, and why would you use it?
- What is the difference between an Istio ingress gateway and an egress gateway?
- How do you inject delays or aborts to test resilience with Istio?
- What is a Gateway resource, and how does it differ from a Kubernetes Ingress?
- What is a DestinationRule, and how does it relate to a VirtualService?