Fred Mériot
Fred Mériot

Reputation: 4357

Does Istio virtualService always needs a DestinationRule?

I'am new to Istio and I just started to play arround with VirtualServices. In the doc, examples show the creation of virtualService AND destinationRule

but here, in this blog article about canary deployment, they just create a virtualService :

kind: VirtualService metadata: name: helloworld spec: hosts: - helloworld http: - route: - destination: host: helloworld subset: v1 weight: 90 - destination: host: helloworld subset: v2 weight: 10

So, without destinationRule, how Istio knows that subset:v1 corresponds to the version:v1 label of the helloworld deployment ?

thank you

Upvotes: 1

Views: 570

Answers (1)

Vadim Eisenberg
Vadim Eisenberg

Reputation: 3427

If the VirtualService uses subsets, you have to define the subsets in a DestinationRule.

I have opened an issue to fix the blog post https://github.com/istio/istio.github.io/issues/2152. Thank you for pointing to the problem.

Upvotes: 3

Related Questions