env:
ubuntu: 16.04
istio version: istio-release-0.8-20180518-01-13(daily build)
kubenetes version: v1.10.0
Steps:
curl -LO https://storage.googleapis.com/istio-release-pipeline-data/daily-build/release-0.8-20180518-01-13/istio-release-0.8-20180518-01-13-linux.tar.gz
tar -xzvf istio-release-0.8-20180518-01-13-linux.tar.gz
cd istio-release-0.8-20180518-01-13
export PATH=$PWD/bin:$PATH
kubectl apply -f install/kubernetes/istio-demo.yaml
kubectl apply -f <(istioctl kube-inject --debug -f samples/bookinfo/kube/bookinfo.yaml)
istioctl create -f samples/bookinfo/routing/bookinfo-gateway.yaml
http://${GATEWAY_URL}/productpage
export GATEWAY_URL=$(kubectl get po -l istio=ingressgateway -n istio-system -o 'jsonpath={.items[0].status.hostIP}'):$(kubectl get svc istio-ingressgateway -n istio-system -o 'jsonpath={.spec.ports[0].nodePort}')
echo http://${GATEWAY_URL}/productpage
Refresh the page several times, I can see different versions of reviews shown in productpage, presented in a round robin style (red stars, black stars, no stars), since I haven鈥檛 yet used Istio to control the version routing.
istioctl create -f samples/bookinfo/routing/route-rule-all-v1.yaml
Looks like there are some mismatched items in samples/bookinfo/routing/route-rule-all-v1.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: productpage
spec:
hosts:
- productpage
gateways:
- bookinfo
- mesh #TODO remove this if not needed
http:
- route:
- destination:
host: productpage
subset: v1
For I just defined gateway named bookinfo-gateway
in samples/bookinfo/routing/bookinfo-gateway.yaml
, however after I update bookinfo
to bookinfo-gateway
, the results remain unchanged.
Have I missed somethings as I followed the latest doc?
/cc @gyliu513
@morvencao
It's probably because the injected proxy is v1 rather than v2 and therefore the destination rules are being ignored.
You can ask istioctl
to inject proxyv2 by setting an env variable ISTIO_PROXY_IMAGE=proxyv2
or run the following injection command instead:
kubectl apply -f <(ISTIO_PROXY_IMAGE=proxyv2 istioctl kube-inject --debug -f samples/bookinfo/kube/bookinfo.yaml)
@ymesika It works, thanks a lot.
Posted a PR here https://github.com/istio/istio.github.io/pull/1329 to fix this issue.
Most helpful comment
@morvencao
It's probably because the injected proxy is v1 rather than v2 and therefore the destination rules are being ignored.
You can ask
istioctl
to inject proxyv2 by setting an env variableISTIO_PROXY_IMAGE=proxyv2
or run the following injection command instead: