istio: cannot access book info example
Describe the bug I followed the steps to install istio and the book info example. i got down as far as accessing the service https://istio.io/docs/examples/bookinfo/#confirm-the-app-is-running.
$ kubectl get svc istio-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
istio-ingressgateway LoadBalancer 10.107.177.68 localhost 80:31380/TCP,443:31390/TCP,31400:31400/TCP,15011:31531/TCP,8060:30656/TCP,15030:32388/TCP,15031:31829/TCP 52m
I am running docker for mac with kubernetes and have a feeling that this is the issue.
Expected behavior I expected to access the service on the nodeport and host localhost
Steps to reproduce the bug Install istio on docker for mac with kubernetes locally and install the book info example.
Version
$ istioctl version
Version: 1.0.0
GitRevision: 3a136c90ec5e308f236e0d7ebb5c4c5e405217f4
User: root@71a9470ea93c
Hub: gcr.io/istio-release
GolangVersion: go1.10.1
BuildStatus: Clean
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:17:39Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.3", GitCommit:"2bba0127d85d5a46ab4b778548be28623b32d0b0", GitTreeState:"clean", BuildDate:"2018-05-21T09:05:37Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}
Is Istio Auth enabled or not?
I installed without mutual TLS
kubectl apply -f install/kubernetes/istio-demo.yaml
Environment Docker for mac version 18.06.0-ce-mac69
Services
$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
details ClusterIP 10.104.19.162 <none> 9080/TCP 1h
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 28d
productpage ClusterIP 10.99.191.13 <none> 9080/TCP 1h
ratings ClusterIP 10.101.138.190 <none> 9080/TCP 1h
reviews ClusterIP 10.103.132.194 <none> 9080/TCP 1h
sleep ClusterIP 10.97.58.54 <none> 80/TCP 1h
pods
$ kubectl get pods
NAME READY STATUS RESTARTS AGE
details-v1-6865b9b99d-nhw2q 2/2 Running 0 1h
productpage-v1-f8c8fb8-6d6rs 2/2 Running 0 1h
ratings-v1-77f657f55d-xb9nf 2/2 Running 0 1h
reviews-v1-6b7f6db5c5-7fklj 2/2 Running 0 1h
reviews-v2-7ff5966b99-jlm67 2/2 Running 0 1h
reviews-v3-5df889bcff-v4t7m 2/2 Running 0 1h
sleep-86f6b99f94-xwr7b 2/2 Running 0 1h
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 31 (7 by maintainers)
I’m using Docker Desktop for Mac (v2.5.0.1) and I don’t see any issues now. The EXTERNAL-IP value is set to localhost. You can see this when you do:
kubectl get svc istio-ingressgateway -n istio-system
Therefore, make sure the INGRESS_PORT is set to 80.
export INGRESS_PORT=$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.spec.ports[?(@.name=="http2")].port}')
Set INGRESS_HOST as follows:
export INGRESS_HOST=127.0.0.1
Set GATEWAY_URL:
export GATEWAY_URL=$INGRESS_HOST:$INGRESS_PORT
echo $GATEWAY_URL
should show127.0.0.1:80
Try accessing productpage from the browser like
http://localhost/productpage
. This should work!I am having the same problem. I’m using Mac with Docker for Desktop installed (k8s running too). Istio v1.5.2 and bookinfo deployment is fine. I have defined both gateway and virtual service, but unable to access http://localhost/productpage
I was testing kubernetes supplied by docker-for-mac with istio 1.0.5 where encountered the exact same problem. I deployed the stack by using a
istio-demo.yaml
file. Took me a while to figure out the routing issue. I found out that the problem is from Gateway resource from that file. It had a wrong pod selector. The correct one should beistio: ingressgateway
but the package contains justistio: ingress
Here is a working copy
Once updated, technically, you should be able to access
http://localhost/productpage
straightaway. However, In my case, I needed to restart an isio-ingressgateway controller pod in istio-system. I shouldn’t need to do that tho.Following the documentation in https://istio.io/latest/docs/setup/getting-started/ doesnt end up with the correct link , namely http://localhost/productpage. Please fix documentation
I met the same problem in docker for mac with istio installed that can not open access book info product page with http://localhost/productpage, as following the troubleshooting instructions:
even I restart the istio-ingressgateway pod, is this a common issue?
I meet a problem,I start the bookinfo application without changing any yaml files: kubectl apply -f <(istioctl kube-injct -f bookinfo.yaml) And start the gateway: kubectl apply -f bookinfo-gateway.yaml Then try to access the productpage service use the port:31380
access the service failed,I tried several times,can not work.
But,It can be access when I start the gateway again.
The first is failed,the second time is successful,why?