This repository contains 3 examples for using Traefik 3.x with Argo Rollouts via the Gateway API
- Example with just a route
- Example with static routes for preview/stable/canary
- Example with header based routing.
Read the full blog at https://codefresh.io/blog/argo-rollouts-header-based-routing/
This process is common to both examples.
Install traefik 3.x, Argo Rollouts and the Gateway API plugin as described traefik-setup/README.md in a local Kubernetes cluster.
Expose the Traefik endpoint as Load Balancer so you can visit it via the browser.
To test just the Gateway API implementation of Traefik apply the manifests
at simple
folder. Then visit http://localhost/example/
to see the application.
Apply the manifests in the static-routing
folder. Then start a canary
by editing the rollout.yml
file and change the docker image to different tags.
Then visit the 3 urls
http://localhost/stable/
This is always old versionhttp://localhost/canary/
This is active canary versionhttp://localhost/preview/
This is always new version
You can inspect the rollout with
kubectl argo rollouts get rollout static-rollouts-demo
Apply the manifests in the dynamic-routing
folder. Then start a canary
by editing the rollout.yml
file and change the APP_VERSION and APP_COLOR to start a canary
Then visit http://localhost
and see that if you change the active header on the UI, the application can be forced to be part of the canary.
You can inspect the rollout with
kubectl argo rollouts get rollout smart-rollouts-demo
If you prefer video format see the Kubecon Presentation.