×
Community Blog Deploy Applications to Clusters in the Data Plane of an ASM Instance

Deploy Applications to Clusters in the Data Plane of an ASM Instance

This article describes how to deploy a sample application to a cluster on the data plane of an ASM instance.

By Wang Xining

This article is the fifth edition in the ASM Public Preview Series, a collection of articles that describes key capabilities of Alibaba Cloud Service Mesh (ASM). As described in the prior articles of this series, the Istio community website provides a Bookinfo example to familiarize beginners with some concepts and capabilities of the service mesh technology. Alibaba Cloud Service Mesh (ASM) also provides a quick-start tutorial about how to deploy the Bookinfo example and this article demonstrates how to deploy a sample application to a cluster on the data plane of an ASM instance. Below is the list of other articles in this series:

Prerequisites

  • At least one ASM instance with at least one Alibaba Cloud Container Service for Kubernetes (ACK) cluster added to the instance.
  • Connected ACK cluster added to the ASM instance using kubectl, which is a Kubernetes command-line client. For more information, see Connect to Kubernetes Clusters Through kubectl.
  • Already added ingress gateway for the cluster because the sample application in this article needs to be exposed to the Internet.

Background

The sample application used in this article is a book review application named Bookinfo. The following figure shows the microservice architecture of the application.

1

This application consists of the following microservices:

  • Productpage: Calls the Details and Reviews microservices to generate a page.
  • Details: Contains book information.
  • Reviews: Contains book-related reviews and will call the Ratings microservice.
  • Ratings: Contains rating information based on book reviews.

The Reviews microservice has three versions.

  • Version 1 does not call the Ratings service.
  • Version 2 calls the Ratings service and displays rating information with one to five black stars.
  • Version 3 calls the Ratings service and displays rating information with one to five red stars.

Application Deployment

  • Log on to the Container Service console. In the left-side navigation pane, choose Clusters > Namespace.
  • On the Namespace page, select the cluster from the Cluster drop-down list.
  • In the Actions column, click Edit for the default namespace.
  • In the Edit Namespace dialog box, click Add to add a label for the namespace. In the Variable Name field, enter istio-injection. In the Variable Value field, enter enabled.
  • Alternatively, run the following command in kubectl to add a label for the namespace:
kubectl label namespace default istio-injection=enabled
  • Download the YAML file of Bookinfo from the GitHub Istio project library.
  • Run the following command in kubectl to deploy Bookinfo to a cluster of the ASM instance:
kubectl apply -f bookinfo.yaml

Results

Consider the following stepps to view the Bookinfo deployment result:

  • Log on to the Container Service console. In the left-side navigation pane, choose Applications > Pod.
  • On the Pod page, select a cluster from the Cluster drop-down list and select default from the Namespace drop-down list.

2

As shown above view pod information on Bookinfo on the Pod page. For more information, click Details in the Actions column for the pod.

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