All Products
Search
Document Center

Alibaba Cloud Service Mesh:Deploy an application in an ASM instance

Last Updated:Sep 28, 2023

After you deploy an ingress gateway in a cluster that is added to a 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 1 does not call the Ratings microservice.

  • Version 2 calls the Ratings microservice and rates a book with one to five black stars.

  • Version 3 calls the Ratings microservice and rates a book with one to five red stars.

Procedure

  1. Enable automatic sidecar proxy injection for the default namespace. For more information, see Enable automatic sidecar proxy injection.

  2. Download the YAML file of the Bookinfo application from the Istio repository of GitHub.

  3. 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

View the result

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

  1. Log on to the ACK console. In the left-side navigation pane, click Clusters.

  2. On the Clusters page, click the name of the cluster that you want to manage and choose Workloads > Pods in the left-side navigation pane.

  3. In the upper part of the Pods page, select default from the Namespace drop-down list.

    Note

    Click View Details in the Actions column of the pod of the Bookinfo application.