This topic describes how to implement a gray release and a blue/green deployment by using the Ingress function provided by Alibaba Cloud Container Service for Kubernetes.
With a gray release or a blue/green deployment, you can create two identical production environments for the latest version of the target software and an earlier version. Then you can apply specific rules to reroute traffic from the earlier version to the latest version without affecting the software of the earlier version. After the software of the latest version has run without exceptions for a specified period, you can reroute all traffic from the earlier version to the latest version.
A/B testing is a type of comparative and incremental gray release. Specifically, with A/B testing, you can keep some users using the service of an earlier version, and reroute traffic of other users to the service of the latest version. If the service of the latest version runs without exceptions for the specified period of time, then you can gradually reroute all user traffic to the service of the latest version.
foo=baror the cookies contain
foo=barto be forwarded to Service A’. Then, after Service A’ has run without exceptions for a specified period, you want to reroute all traffic from Service A to Service A’, and then smoothly bring Service A offline.
To meet the preceding application release requirements, Alibaba Cloud Container Service for Kubernetes uses the Ingress function to provide the following four methods of traffic distribution:
- Distribute traffic according to the request header
- Distribute traffic according to the cookie
- Distribute traffic according to the Query Param
- Distribute traffic according to the service weight