What happens when a destinationrule is pushed in istio

I recently started looking into istio and got confused by the destination rule configuration.

Say I have a service A that have 10 pods running behind it. I pushed a destination rule that has two subsets with label version=v1 and version=v2.

So I'm wondering what will happen to the 10 pods under the hood? Will they be divided into two subsets automatically or just remain unlabeled? Or the subsets will only be valid when the pods themselves are labeled with version=v1 and version=v2?

Thanks a lot!

1 answer

  • answered 2018-07-11 09:49 mk_sta

    The general purpose is to set up DestinationRule resource in order to specify how the network traffic will reach your underlying Kubernetes cluster Pods. Subsets parameter in Istio defines labels that identify version specific instances.

    The below example of Istio DestinationRule configuration demonstrates how it works and can potentially reproduce your case:

    apiVersion: networking.istio.io/v1alpha3
    kind: DestinationRule
      name: reviews
      host: reviews
      - name: v1
          version: v1
      - name: v2
          version: v2

    Actually, label version: v1 indicates that only Pods in Kubernetes marked with the same label will receive network traffic; therefore the same approach will work for label version: v2.

    There are several resources available in Istio that can expand functionality for network management purposes as described in Official documentation.