Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

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.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Advanced
Duration
Clock icon 1h 0m
Published
Clock icon Apr 05, 2019

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. 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

  2. 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
    

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

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.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans