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

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

This article uses an official example to demonstrate how to deploy applications in an Istio environment on the basis of Alibaba Cloud Container Service.

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.

1

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:

2

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.

3

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:

4

Confirm that all services are normally started:

5

Access the Application

Run the following command to obtain the ingress address information:

kubectl get svc  istio-ingressgateway -n istio-system

6

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.

7

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

8

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
0 0 0
Share on

Xi Ning Wang(王夕宁)

56 posts | 8 followers

You may also like

Comments

Xi Ning Wang(王夕宁)

56 posts | 8 followers

Related Products