---
title: " Request Routing and Policy Management with the Istio Service Mesh "
date: 2017-10-10
slug: request-routing-and-policy-management
url: /blog/2017/10/Request-Routing-And-Policy-Management
author: >
Frank Budinsky (IBM),
Andra Cismaru (Google),
Israel Shalom (Google)
---
_**Editor's note:** Today’s post is the second post in a three-part series on Istio._
In a [previous article](https://kubernetes.io/blog/2017/05/managing-microservices-with-istio-service-mesh), we looked at a [simple application (Bookinfo)](https://istio.io/docs/guides/bookinfo.html) that is composed of four separate microservices. The article showed how to deploy an application with Kubernetes and an Istio-enabled cluster without changing any application code. The article also outlined how to view Istio provided L7 metrics on the running services.
This article follows up by taking a deeper look at Istio using Bookinfo. Specifically, we’ll look at two more features of Istio: request routing and policy management.
## Running the Bookinfo Application
As before, we run the v1 version of the Bookinfo application. After [installing Istio](https://istio.io/docs/setup/kubernetes/quick-start.html) in our cluster, we start the app defined in [bookinfo-v1.yaml](https://raw.githubusercontent.com/istio/istio/master/samples/kubernetes-blog/bookinfo-v1.yaml) using the following command:
```
kubectl apply -f \<(istioctl kube-inject -f bookinfo-v1.yaml)
```
We created an Ingress resource for the app:
```
cat \<\<EOF | kubectl create -f -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: bookinfo
annotations:
kubernetes.io/ingress.class: "istio"
spec:
rules:
- http:
paths:
- path: /productpage
backend:
serviceName: productpage
servicePort: 9080
- path: /login
backend:
serviceName: productpage
servicePort: 9080
- path: /logout
backend:
serviceName: productpage
servicePort: 9080
EOF
```
Then we retrieved the NodePort address of the Istio Ingress controller:
```
export BOOKINFO\_URL=$(kubectl get po -n istio-system -l istio=ingress -o jsonpath={.items[0].status.hostIP}):$(kubectl get svc -n istio-system istio-ingress -o jsonpath={.spec.ports[0].nodePort})
```
Finally, we pointed our browser to [http://$BOOKINFO\_URL/productpage](about:blank), to see the running v1 application:
