Introduction to Service Mesh and Istio Deployment (Part 2)

Introduction to Service Mesh and Istio Deployment (Part 2)

Istio Deployment

Istio requires K8S 1.7.3 or higher to support RBAC (including kubectl ver >= 1.7.3)

K8S controller:10.0.11.10

K8S workers:10.0.11.11,10.0.11.12,10.0.11.13

K8S version:1.8.3

OS:ubuntu 16.04 LTS

Go to the istio release to download the latest version of istio and extract the contents into the work folder.

Or input the following command to automatically download and extract to istio-path

Follow the instructions of install/kubernetes/README.md, Istio has the following deployment modes:

The following is an example of deploying Istio (no TLS connection) without authentication

Verify that all the Pods are running

Copy istioctl to /usr/bin

Reference:Istio學習的開始(一)Istio Quick Start

Testing Istio

Istio officially provides several models (Work with Istio) for developers to test and understand how to write for Istio. These models show off how Istio controls the sample Pods. All the settings can be found in samples in the Istio folder, like Bookinfo. There are three platforms to test, which are consul, enreka and k8s.

The following is a Bookinfo example, which provides a service for users to view book ratings, descriptions, and other details. This is shown in Figure 11, which includes 4 microservices:

productpage. The productpage microservice calls the details and reviews microservices to populate the page.

details. The details microservice contains book information.

reviews. The reviews microservice contains book reviews. It also calls the ratings microservice.

ratings. The ratings microservice contains book ranking information that accompanies a book review.

In the Review example there are three different versions of Review. Istio is connected to all three versions in the example, therefore whenever the page is refreshed, the connection will be looped to the next version. V1 has no scores, V2’s score has black stars, and V3 has the red stars.

The Bookinfo Service pod  will inject sidecar(Envoy) to each of bookinfo.yaml’s pods as shown below in Figure 12. In order for the sidecar to work, certain conditions have to be met when designing the Pods so that they can be called by sidecar.

Verifying Deployment

Verifying Service

First, access bookinfo through the node port

Use a browser to open 10.0.11.12:31838/productpage as shown in Figure 13 below

You are able to refresh the page. After refreshing, due to the Istio settings, the black star from V2 will appear, and subsequent refreshes will cycle to different versions.

After deploying Istio and the examples, Istio also provides several other addons to monitor traffic or display service topology.  The following article will show you how to use the addons provided by Istio, including deploying Zipkin, tracing microservices, deploying Prometheus to query for monitoring messages, and how Prometheus can provide more information when used with Grafana or Istio’s Servicegraph addon

Extended Readings:
Introduction to Service Mesh and Istio Deployment (Part 3)

Written By 呂威廷 迎棧科技工程師

EDM

Select list(s)*

 

Loading