Difficulty: intermediate
Estimated Time: 10-15 minutes

BoxBoat Logo

Istio Blog Post 1 Lab - Traffic Management

This lab accompanies the blog post Istio Part 1 - Kubernetes Weight Based Traffic Management In this lab we will:

  • Install Istio 1.2.2
  • Configure and deploy 3 versions of a simple app and its logging backend using Istio and Kubernetes
  • Use Istio to give equal weighting to each version of the app
  • Update Istio's routing rules to send more traffic to certain versions of the application

Please email feedback to: [email protected]

Congratulations, you've now successfully installed Istio and used it to weight traffic to an application! Check out other labs from our blog here or view more interesting containerization content at boxboat.com/blog! Be sure to check out the blog for future Istio scenarios!

Istio Traffic Management 1

Step 1 of 5

Install Istio

Istio is a service mesh that can be run on top of Kubernetes. It provides resources to connect, authorize, and observe network traffic between Kubernetes pods.

We will begin by installing Istio 1.2.2 on to our cluster.

Get the Release

Download the release: export ISTIO_VERSION=1.2.2

curl -L https://git.io/getLatestIstio | sh -

Add istioctl to your PATH:

export PATH=$PWD/istio-$ISTIO_VERSION/bin/:$PATH

Install Istio

Create a namespace for Istio's system components:

kubectl create namespace istio-system

Create the CRDs:

helm template istio-$ISTIO_VERSION/install/kubernetes/helm/istio-init --name istio-init --namespace istio-system | kubectl apply -f -

Ensure that there are 23 CRDs: kubectl get crds | grep 'istio.io\|certmanager.k8s.io' | wc -l

Once all of the CRDs are created, it's time to deploy Istio! To save time and reduce resource requirements, we are going to deploy the minimal configuration and enable gateways. This will install the Istio's pilot and ingressgateway which are the minimum components we need to manage traffic and expose endpoints.

Deploy Istio: helm template istio-$ISTIO_VERSION/install/kubernetes/helm/istio --name istio --namespace istio-system \ --values istio-$ISTIO_VERSION/install/kubernetes/helm/istio/values-istio-minimal.yaml \ --set gateways.enabled=true | kubectl apply -f -

Once istio is deployed, wait for its components to come up. kubectl -n istio-system get po

It may take a few seconds before the pilot and gateway pods show 1/1.