In the previous chapter, we deployed the Bookinfo sample microservice in the istio-lab namespace. Run kubectl -n istio-lab get pods and notice that each pod is running only one container for every microservice.
Enabling Istio
Enabling Istio for an existing application
To enable Istio for an existing application, we will use istioctl to generate additional artifacts in bookinfo.yaml, so the sidecar proxy is added to every pod:
- First, generate modified YAML with a sidecar proxy for the Bookinfo application:
$ cd ~/servicemesh
$ istioctl kube-inject -f bookinfo.yaml > bookinfo_proxy.yaml
$ cat bookinfo_proxy.yaml
...
template:
metadata:
annotations:
sidecar.istio.io/interceptionMode: REDIRECT
...
traffic...