Now that we have all the resources installed for Istio, we will use sample application called BookInfo to review key capabilities of the service mesh such as intelligent routing, and review telemetry data using Prometheus & Grafana.
The Bookinfo application is broken into four separate microservices:
productpage
details
reviews
ratings
There are 3 versions of the reviews microservice:
Version v1
Version v2
Version v3
Deploy sample apps by manually injecting istio proxy and confirm pods, services are running correctly
kubectl apply -f <(istioctl kube-inject -f samples/bookinfo/platform/kube/bookinfo.yaml)
The output from
kubectl get pod,svc
Should look similar to:
NAME READY STATUS RESTARTS AGE
details-v1-64558cf56b-dxbx2 2/2 Running 0 14s
productpage-v1-5b796957dd-hqllk 2/2 Running 0 14s
ratings-v1-777b98fcc4-5bfr8 2/2 Running 0 14s
reviews-v1-866dcb7ff-k69jm 2/2 Running 0 14s
reviews-v2-6d7959c9d-5ppnc 2/2 Running 0 14s
reviews-v3-7ddf94f545-m7vls 2/2 Running 0 14s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
details ClusterIP 10.100.102.153 <none> 9080/TCP 17s
kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 138d
productpage ClusterIP 10.100.222.154 <none> 9080/TCP 17s
ratings ClusterIP 10.100.1.63 <none> 9080/TCP 17s
reviews ClusterIP 10.100.255.157 <none> 9080/TCP 17s
Next we’ll define the virtual service and ingress gateway:
kubectl apply -f samples/bookinfo/networking/bookinfo-gateway.yaml
Next, we’ll query the DNS name of the ingress gateway and use it to connect via the browser.
kubectl get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' -n istio-system ; echo
This may take a minute or two, first for the Ingress to be created, and secondly for the Ingress to hook up with the services it exposes.
To test, do the following:
get service istiogateway
commandRemember to add /productpage to the end of the URI in the browser to see the sample webpage!
Click reload multiple times to see how the layout and content of the reviews changes as differnt versions (v1, v2, v3) of the app are called.