I have a confusion between Virtual Service and Destinationrule on which one is executed first?
Let’s say I have below configs,
apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: movies namespace: aio spec: host: movies subsets: - labels: version: v1 name: version-v1 - labels: version: v2 name: version-v2 ---
apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: movies namespace: aio spec: hosts: - movies http: - route: - destination: host: movies subset: version-v1 weight: 10 - destination: host: movies subset: version-v2 weight: 90 ---
I read somewhere that,
A VirtualService defines a set of traffic **routing rules** to apply when a host is addressed.
DestinationRule defines policies that apply to traffic intended for service **after routing has occurred.**
Does this mean Destinationrules are invoked after Virtualservices?
I have a small diagram, is my understanding correct?