All Products
Search
Document Center

Alibaba Cloud Service Mesh:Deploy an application in an ACK cluster that is added to an ASM instance

最終更新日:May 13, 2024

After you deploy an ingress gateway in a Container Service for Kubernetes (ACK) cluster that is added to a Service Mesh (ASM) instance, you can deploy applications in the ACK cluster. This topic describes how to deploy a Bookinfo application in an ACK cluster that is added to the ASM instance.

Prerequisites

Application description

In this example, a book review application that is named Bookinfo is used. 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 to the ACK cluster that is added to the ASM instance:

    kubectl apply -f bookinfo.yaml
  4. 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.

Related operations

You can create an Istio gateway and a virtual service for an ingress gateway to control service access. In addition, you can create a destination rule to route traffic to different versions of the service based on the specified ratio. For more information, see Use Istio resources to route traffic to different versions of a service.