0

I'm new to istio and I have my the entire code in http://github.com/VenkateshSrini/IstioTest. I have created the service needed for hosting the Kubernetes service (istio-test-deployment.yaml in the repo). I tested it on docker desktop for windows (Kubernetes enabled) and I got the same working correctly. I had exposed my service via port 5000. In docker for windows the external Ip is always localhost.

Now using istoctl I created a created a side car deployment. That can be seen from istio-test-dep-injected.yaml. I executed this and service was created with Sidecar. Now the same service is not accessible via http://localHost:5000, which I think is correct

Then I went ahead and created the Virtual Gateway. The definition of the same can be seen at virtual-gateway.yaml. Then I created a virtual service as per virtualservice.yaml. In that I have provided the host and the name of Kubernetes service name and the port as 5000.

Even after all this I'm unable to access the Service using the url http://localHost/api/version

Can someone help me, because I do not find much help working with Istio with Docker for Windows

veben
  • 19,637
  • 14
  • 60
  • 80
Venkatesh
  • 320
  • 2
  • 18
  • Maybe it is related with `match` rule in `VirtualService`? https://istio.io/docs/reference/config/istio.networking.v1alpha3/#HTTPRoute Can you just map root endpoint? – nurgasemetey Dec 21 '18 at 12:29

1 Answers1

0

It seems that you forgot adding match rule. Try following add match field

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: istio-test-virtualservice
spec:
  gateways:
  - istio-test-gateway
  hosts:
  - '*'
  http:
  - match:
    - uri:
        prefix: /
    route:
    - destination:
        host: istio-test
        port:
          number: 5000
nurgasemetey
  • 752
  • 3
  • 15
  • 39
  • Still not working. I tried accessing the service with localhost:31380/api/version and then tried localhost:5000/api/version and then tried localhost/api/version but stillnot working. I tried even giving the host as istio-test.istio-apps.svc.local and even localhost that also did not work. Badly stuck – Venkatesh Dec 25 '18 at 13:41
  • Additionally I see this in pod logs Error from server (BadRequest): a container name must be specified for pod istio-test-5744c6c67d-f676h, choose one of: [istio-test istio-proxy] or one of the init containers: [istio-init] – Venkatesh Dec 25 '18 at 13:42
  • I have raised the issue with the Istio team also @https://github.com/istio/istio/issues/10568 but there also I'm not getting any response – Venkatesh Dec 29 '18 at 03:41