Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to deploy Argo Rollouts and Ambassador for grayscale publishing on Kubernetes

Shulou Source: shulou.com Published: 2022-05-31 16:58:19 09月12日 Update

This article is about how to deploy Argo Rollouts and Ambassador for grayscale publishing on Kubernetes. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Integration of Ambassador API Gateway and Argo

Grayscale release (Canary release / Canary) is a powerful strategy to reduce production risk by incrementally releasing a new version of the software to a subset of users. Suppose you launch a v1.1 version of the service, but it has a bug. Instead of immediately exposing it to all traffic, start the release process by exposing v1.1 to a subset of the traffic (for example, 5%). Over time, your traffic gradually increases to 100%. In the meantime, any exposed bug is limited to a subset of your users.

Although simple in theory, using grayscale publishing in practice requires integrating CI pipelines with ongoing deployment workflows such as Argo, and using API gateways to manage traffic to services.

AmbassadorAPI Gateway

Ambassador is an open source kubernetes native API gateway and ingress controller built on Envoy agents. Common use cases for Ambassador include routing gRPC traffic, authentication, and rate limiting. Although Ambassador supports standard ingress classes, most users use Ambassador mapping resources. Mapping resources define routes and support a large number of attribute sets, which go beyond the standard set supported by ingress. Here is an example of mapping:

ApiVersion: getambassador.io/v2

Kind: Mapping

Metadata:

Name: echo

Spec:

Prefix: / echo

Rewrite: / echo

Service: echo-stable:80

Publish grayscale on Kubernetes

We have established a native integration (code) between Argo Rollouts and Ambassador [1]. You can now create a Rollout resource to reference Ambassador mapping:

ApiVersion: argoproj.io/v1alpha1

Kind: Rollout

Metadata:

Name: echo-rollout

Annotations:

Spec:

Replicas: 5

RevisionHistoryLimit: 2

Selector:

MatchLabels:

App: echo

Template:

Metadata:

Labels:

App: echo

Spec:

Containers:

-image: hashicorp/http-echo

Args:

-"- text=VERSION 137"

-- listen=:8080

ImagePullPolicy: Always

Name: echo-v1

Ports:

-containerPort: 8080

Strategy:

Canary:

StableService: echo-stable

CanaryService: echo-canary

TrafficRouting:

Ambassador:

Mapping:

-echo

Steps:

-setWeight: 20

-pause: {duration: 10s}

-setWeight: 50

-pause: {duration: 10s}

-setWeight: 100

-pause: {duration: 10}

Notice the bold section above, which refers to the Ambassador mapping resource named echo defined above. Applying these configurations to the cluster will start the echo-canary service, which will route 20% of the traffic to canary for 10 seconds, then increase to 50% in 10 seconds, and then to 100%.

Thank you for reading! This is the end of this article on "how to deploy Argo Rollouts and Ambassador for grayscale release on Kubernetes". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Traffic grayscale gateways resources services subsets users routing support content more standards articles good practical powerful between code entry increment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno macOS Huawei Apple Shulou Information