Go through Istio features with samples on Alibaba Cloud Container Service for Kubernetes

The first Istio version (V1.0) available for production was officially released on July 31, 2018.

The previous article has introduced Istio and its core components, and described how to quickly build an Istio open platform for connecting, managing, and securing microservices on the basis of Alibaba Cloud Container Service for Kubernetes.

This article uses an official example to demonstrate how to deploy applications in this Istio environment. This example comes with Istio. For more information about this example, visit the official Istio guide. As shown below, the example application is composed of four separate microservices that are compiled in different languages. These services are not dependent on Istio.

Image for post
Image for post

Deploy the Application

To run the example application with Istio requires no changes to the application itself. Instead, you simply need to configure and run the services in an Istio-enabled environment, with Envoy sidecars injected along side each service.

All of the microservices will be packaged with an Envoy sidecar that intercepts incoming and outgoing calls for the services, providing the hooks needed to externally control, via the Istio control plane, routing, telemetry collection, and policy enforcement for the application as a whole.

Download and Install istioctl

As of writing, the latest Istio LTS version is 0.8.0. You can download and install this version at this link.

After installation, find the examples directory, as shown below:

Bookinfo Installation Example

By default, you must manually inject a sidecar for the created Kubernetes cluster by running the following command:

kubectl apply -f <(istioctl kube-inject --debug -f samples/bookinfo/kube/bookinfo.yaml)

The istioctl kube-inject command is used to modify the bookinfo.yaml file before creating the deployments.This injects Envoy into the Kubernetes resources.

The preceding command launches all the four microservices, as shown in the following figure.Three versions of the reviews service, including v1, v2, and v3, are started.

Image for post
Image for post

Run the following command to define the ingress gateway:

istioctl create -f samples/bookinfo/routing/bookinfo-gateway.yaml

By now, the microservices in the example and their sidecars and ingresses are established, as shown below:

Image for post
Image for post

Confirm that all services are normally started:

Image for post
Image for post

Access the Application

Run the following command to obtain the ingress address information:

kubectl get svc  istio-ingressgateway -n istio-system
Image for post
Image for post

Alternatively, you can view the ingress address information on the Alibaba Cloud Container Service for Kubernetes interface. As shown in the figure below, click Services on the left-side navigation bar, and select the namespace istio-system on the right. The istio-ingressgateway information is displayed.

Image for post
Image for post

Access example page: http://{EXTERNAL-IP}/productpage

Image for post
Image for post

If you refresh the browser for multiple times, different versions of the reviews service are displayed on the productpage in round robin (red star, black star, and no star) mode. This is because Istio is currently not used to control version routing.

Based on this example, the next article will explain how to use the Istio functions, such as traffic routing, fault injection, rate limiting, and traffic shifting.

Summary

We can use Alibaba Cloud Container Service for Kubernetes to quickly build an Istio open platform for connecting, managing, and securing microservices, and to introduce and configure multiple relevant services for applications.This article uses an official example to demonstrate how to deploy applications in this Istio environment. Based on this example, the next article will explain how to use the Istio functions, such as traffic routing, fault injection, rate limiting, and traffic shifting.

You are welcome to use Alibaba Cloud Container Service for Kubernetes to quickly build an Istio open platform and integrate Istio to microservice development in your project.

This article series introduces Istio and its core components, as well as describes how to quickly build an Istio open platform for connecting, managing, and securing microservices on the basis of Alibaba Cloud Container Service for Kubernetes. These articles also use an official example to demonstrate how to deploy an application in the Istio environment; how to configure intelligent routing and distributed tracing; and how to configure Istio functions of collecting, querying, and visualizing the telemetry data.

To review these articles, see:

  1. Using Istio on Alibaba Cloud Container Service for Kubernetes
  2. Go through Istio Features with Samples on Alibaba Cloud Container Service for Kubernetes
  3. Intelligent Routing with Istio on Alibaba Cloud Container Service for Kubernetes
  4. Distributed Tracking with Istio on Alibaba Cloud Container Service for Kubernetes
  5. Telemetry Data Collection, Query, and Visualization with Istio on Alibaba Cloud Container Service for Kubernetes
  6. Fault Diagnosis and Detection using Istio within Alibaba Cloud Container Service for Kubernetes
  7. Observability Analysis using Istio and Kiali within Alibaba Cloud Container Service for Kubernetes

Reference:

https://www.alibabacloud.com/blog/go-through-istio-features-with-samples-on-alibaba-cloud-container-service-for-kubernetes_593918?spm=a2c4.12014473.0.0

Written by

Follow me to keep abreast with the latest technology news, industry insights, and developer trends.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store