Configure Traffic Management Using Istio
Before you begin
- You have read Traffic Management Using Istio
- You have installed Istio in your target cluster.
- You know how to configure Istio’s VirtualService and associated DestinationRule.
- You know how to create a CD-as-a-Service deployment config file.
CD-as-a-Service does not configure proxy sidecar injection.
Create your Istio resources manifest
Create a manifest that defines your VirtualService and DestinationRule resources. Armory recommends one VirtualService with one DestinationRule for your deployment. CD-as-a-Service modifies these resources based on the canary strategy that you define in your deployment file. You can deploy these resources separately or as part of your CD-as-a-Service deployment.
Configure your CD-as-a-Service deployment
Configure your Istio resources in the trafficManagement.targets
section of your deployment file.
trafficManagement:
- targets: ["<target-name>"]
istio:
- virtualService:
name: <VirtualService-metadata-name>
httpRouteName: <VirtualService-http-route-name>
destinationRule:
name: <DestinationRule-metadata-name>
activeSubsetName: <VirtualService-http-route-destination-subset-name>
canarySubsetName: <canary-subset-name>
-
targets
: (Optional) comma-delimited list of deployment targets; if omitted, CD-as-a-Service applies the traffic management configuration to all targets. -
istio.virtualService
: (Required)istio.virtualService.name
: The name of your VirtualServiceistio.virtualService.httpRouteName
: The name of the HTTPRoute defined in your VirtualService. This field is optional if you define only one HTTPRoute.
-
istio.destinationRule
: Optional if you only define only one DestinationRule.istio.destinationRule.name
: The name of your DestinationRuleistio.destinationRule.activeSubsetName
: The name of the subset configured in your VirtualService HTTPRoute destination. This subset is running the current version of your app.activeSubsetName
is optional if you define only one active subset.istio.destinationRule.canarySubsetName
: (Optional) The name of the canary subset defined in your DestinationRule.
Example resources and deployment files
In this example, you deploy an app called “reviews”. You define your Istio resources in istio-resources.yaml
and deploy that manifest as part of your app deployment.
CD-as-a-Service Deployment (deploy.yaml) | Istio Resources (istio-resources.yaml) |
---|---|
|
|
Mapping
Deployment Field (deploy.yaml) | Deploy Line | Istio Resources Field (istio-resources.yaml) | Istio Line |
---|---|---|---|
virtualService.name | 28 | VirtualService.metadata.name | 4 |
virtualService.httpRouteName | 29 | VirtualService.http.route.name | 13 |
destinationRule.name | 31 | DestinationRule.metadata.name | 18 |
destinationRule.activeSubsetName | 32 | VirtualService.http.route.destination.subset | 12 |
What’s next
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified January 13, 2023: (d790310a)