- Lab
-
Libraries: If you want this lab, consider one of these libraries.
- Cloud

Istio in Kubernetes
In this hands-on lab, we will be installing and configuring Istio in Kubernetes. Once it's installed, we will deploy an application and do some basic routing.

Lab Info
Table of Contents
-
Challenge
Deploy Istio into a Kubernetes Cluster and Deploy the bookinfo Application
Get the Istio installation package onto the Kube Master and unpack it:
[cloud_user@km]$ wget https://github.com/istio/istio/releases/download/1.0.6/istio-1.0.6-linux.tar.gz [cloud_user@km]$ tar -xvf istio-1.0.6-linux.tar.gz
Add
istioctl
to our path:[cloud_user@km]$ export PATH=$PWD/istio-1.0.6/bin:$PATH
Set Istio to NodePort at port 30080:
[cloud_user@km]$ sed -i 's/LoadBalancer/NodePort/;s/31380/30080/' ./istio-1.0.6/install/kubernetes/istio-demo.yaml
Bring up the Istio control plane:
[cloud_user@km]$ kubectl apply -f ./istio-1.0.6/install/kubernetes/istio-demo.yaml
Verify that the control plane is running:
[cloud_user@km]$ kubectl -n istio-system get pods
When all of the pods are up and running (which we can verify by running that command again) we can move on.
Install the bookinfo application with manual sidecar injection:
[cloud_user@km]$ kubectl apply -f <(istioctl kube-inject -f istio-1.0.6/samples/bookinfo/platform/kube/bookinfo.yaml)
Verify that the application is running and that there are 2 containers per pod:
[cloud_user@km]$ kubectl get pods
Ignore the
busybox
pod, that's part of the environment.Once everything is running, let's create an ingress and virtual service for the application:
[cloud_user@km]$ kubectl apply -f istio-1.0.6/samples/bookinfo/networking/bookinfo-gateway.yaml
Verify the page loads at the uri http://<
kn1
_IP ADDRESS>:30080/productpage -
Challenge
Verify That Routing Rules Are Working by Configuring the Application to Route to `v1` Then `v2` of the `reviews` Backend Service
Set the default destination rules:
[cloud_user@km]$ kubectl apply -f istio-1.0.6/samples/bookinfo/networking/destination-rule-all.yaml
Route all traffic to version 1 of the application and verify that it is working:
[cloud_user@km]$ kubectl apply -f istio-1.0.6/samples/bookinfo/networking/virtual-service-all-v1.yaml
Update the virtual service file to point to version 2 of the service and verify that it is working. Edit
istio-1.0.6/samples/bookinfo/networking/virtual-service-all-v1.yaml
(using whatever text editor you like) and change this:- destination: host: reviews subset: v1
to this:
- destination: host: reviews subset: v2
About the author
Real skill practice before real-world application
Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.
Learn by doing
Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.
Follow your guide
All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.
Turn time into mastery
On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.