Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report