After you deploy an ingress gateway service in a cluster that is added to an Alibaba Cloud Service Mesh (ASM) instance, you can deploy applications in the ASM instance. This topic describes how to deploy an application in an ASM instance.

Prerequisites

Background information

In this topic, a book review application that is named Bookinfo is used as an example. The following figure shows the microservices model of the application.
The Bookinfo application consists of the following microservices:
  • Productpage: generates pages by calling the Details and Reviews microservices.
  • Details: contains the information about books.
  • Reviews: contains book reviews and may call the Ratings microservice.
  • Ratings: contains book ratings that are generated based on book reviews.
The Reviews microservice has the following versions:
  • Version v1 does not call the Ratings microservice.
  • Version v2 calls the Ratings microservice and displays each rating as one to five black stars.
  • Version v3 calls the Ratings microservice and displays each rating as one to five red stars.

Procedure

  1. Log on to the Container Service console.
  2. In the left-side navigation pane of the ACK console, click Clusters.
  3. On the Clusters page, find the cluster that you want to manage and click the name of the cluster or click Details in the Actions column. The details page of the cluster appears.
  4. In the left-side navigation pane of the details page, click Namespaces and Quotas.
  5. On the Namespace page, click Edit in the Actions column of the default namespace.
  6. In the Edit Namespace dialog box, create one or more tags for the namespace. In this example, perform the following steps to create a tag. Then, click Add.
    1. Set Variable Name to istio-injection.
    2. Set Variable Value to enabled.
    Note Alternatively, you can run the following command on the kubectl client to tag a namespace:
    kubectl label namespace default istio-injection=enabled
  7. Download the YAML file of the Bookinfo application from the Istio repository of GitHub.
  8. Run the following command on the kubectl client to deploy the Bookinfo application in the ACK cluster that is added to the ASM instance:
    kubectl apply -f bookinfo.yaml

Result

To view the deployment information about the Bookinfo application, perform the following steps:

  1. Log on to the Container Service console.
  2. In the left-side navigation pane, click Clusters.
  3. On the Clusters page, click the name of the cluster where the Bookinfo application is deployed. Alternatively, click Details in the Actions column of the cluster where the Bookinfo application is deployed.
  4. In the left-side navigation pane of the details page, click Pods.
  5. At the top of the Pods tab, select default from the Namespace drop-down list.
    Note Click View Details in the Actions column of the pod of the Bookinfo application.