debugging istio Content-based routing

7/25/2018

I am getting to know Istio through bookinfo sample app. At this point, I am testing the Content-based routing and as part of the debugging process I have to use a curl command on the Istio-ingress pod but it's not there (which is weird because according to the istio site it should be there) should I install it offline (not excited about it ) or should I connect the pod to the internet? is there any other way to check if the VirtualService and DestinationRule are working properly?

Kubernetes version : 1.11.1

Calico version : 3.1

Istio version : 0.8.0

I mean I created the VirtualService but it isn't working and I want to know how to debug that because the method proposed in istio official site uses the curl command (which does not exist in the istio-ingress pod)

this is the out put of kubectl get virtualservices -o yaml

apiVersion: v1
items:
- apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    creationTimestamp: 2018-07-19T14:33:00Z
    generation: 1
    name: bookinfo
    namespace: default
    resourceVersion: "27242"
    selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/bookinfo
    uid: a3238ced-8b60-11e8-8bbd-080027f49aa7
  spec:
    gateways:
    - bookinfo-gateway
    hosts:
    - '*'
    http:
    - match:
      - uri:
          exact: /productpage
      - uri:
          exact: /login
      - uri:
          exact: /logout
      - uri:
          prefix: /api/v1/products
      route:
      - destination:
          host: productpage
          port:
            number: 9080
- apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    creationTimestamp: 2018-07-26T07:25:08Z
    generation: 1
    name: details
    namespace: default
    resourceVersion: "165316"
    selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/details
    uid: 068c51e2-90a5-11e8-84d8-080027f49aa7
  spec:
    hosts:
    - details
    http:
    - route:
      - destination:
          host: details
          subset: v1
- apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    creationTimestamp: 2018-07-26T07:25:08Z
    generation: 1
    name: productpage
    namespace: default
    resourceVersion: "165313"
    selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/productpage
    uid: 0688fb66-90a5-11e8-84d8-080027f49aa7
  spec:
    gateways:
    - bookinfo
    hosts:
    - productpage
    http:
    - route:
      - destination:
          host: productpage
          subset: v1
- apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    creationTimestamp: 2018-07-26T07:25:08Z
    generation: 1
    name: ratings
    namespace: default
    resourceVersion: "165315"
    selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/ratings
    uid: 068b1107-90a5-11e8-84d8-080027f49aa7
  spec:
    hosts:
    - ratings
    http:
    - route:
      - destination:
          host: ratings
          subset: v1
- apiVersion: networking.istio.io/v1alpha3
  kind: VirtualService
  metadata:
    creationTimestamp: 2018-07-26T07:25:08Z
    generation: 1
    name: reviews
    namespace: default
    resourceVersion: "166771"
    selfLink: /apis/networking.istio.io/v1alpha3/namespaces/default/virtualservices/reviews
    uid: 068a454e-90a5-11e8-84d8-080027f49aa7
  spec:
    hosts:
    - reviews
    http:
    - match:
      - headers:
          cookie:
            regex: ^(.*?;)?(user=mariam)(;.*)?$
      route:
      - destination:
          host: reviews
          subset: v2
    - route:
      - destination:
          host: reviews
          subset: v1
kind: List
metadata:
  resourceVersion: ""
  selfLink: ""
-- mariam triki
istio
kubernetes
project-calico

0 Answers