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

Istio in Docker

In this hands-on lab, we will be installing Istio into a Docker environment. We'll deploy an application and using routing rules to version it.

Google Cloud Platform icon

Path Info

Clock icon Advanced
Clock icon 1h 0m
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

    Install Istio and Its Dependencies for Docker, Then Deploy the bookinfo Application

    Add current user to docker group:

    sudo usermod -aG docker cloud_user

    Install docker-compose and make it executable:

    [cloud_user@host]$ sudo curl -L "" -o /usr/local/bin/docker-compose  
    [cloud_user@host]$ sudo chmod +x /usr/local/bin/docker-compose

    We'll run docker-compose real quick, just to make sure it works before we proceed. We'll see its help output if all is well.

    Now we can download Istio and unpack it:

    [cloud_user@host]$ wget
    [cloud_user@host]$ tar -xvf istio-1.0.6-linux.tar.gz

    Pre-configure kubectl for pilot:

    [cloud_user@host]$ kubectl config set-context istio --cluster=istio
    [cloud_user@host]$ kubectl config set-cluster istio --server=http://localhost:8080
    [cloud_user@host]$ kubectl config use-context istio

    Create a DOCKER_GATEWAY environment variable:

    [cloud_user@host]$ export DOCKER_GATEWAY=

    Bring up Istio's control plane:

    [cloud_user@host]$ docker-compose -f ./istio-1.0.6/install/consul/istio.yaml up -d

    Remember that this may need to be repeated to ensure the pilot container starts.

    Change bookinfo.yaml, and set port 30080 instead of port 9081:

    [cloud_user@host]$ sed -i 's/9081/30080/' ./istio-1.0.6/samples/bookinfo/platform/consul/bookinfo.yaml

    Bring up the application:

    [cloud_user@host]$ docker-compose -f ./istio-1.0.6/samples/bookinfo/platform/consul/bookinfo.yaml up -d

    Bring up the sidecars:

    [cloud_user@host]$ docker-compose -f ./istio-1.0.6/samples/bookinfo/platform/consul/bookinfo.sidecars.yaml up -d

    Point a browser at the public IP address of the server, on the correct port: http://<PUBLIC_SERVER_IP>:30080/productpage.

  2. Challenge

    Route Application Traffic to reviews Version 1 and Confirm that Version 1 (with No Stars) is Loading

    Route traffic to version 1

    kubectl apply -f ./istio-1.0.6/samples/bookinfo/platform/consul/destination-rule-all.yaml
    kubectl apply -f ./istio-1.0.6/samples/bookinfo/platform/consul/virtual-service-all-v1.yaml
  3. Challenge

    Route the Traffic to Version 3 of the reviews Service (with Red Stars)

    We need to modify the routing service subsets to read the labels for Version 3. Edit istio-1.0.6/samples/bookinfo/platform/consul/virtual-service-all-v1.yaml (using whatever text editor you like) and change the subset to V3 in the reviews section. Then apply the changes with:

    [cloud_user@host]$ kubectl apply -f ./istio-1.0.6/samples/bookinfo/platform/consul/virtual-service-all-v1.yaml

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