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
An ASM instance is created, and an ACK cluster is added to the instance. For more information, see Create an ASM instance and Add a cluster to an ASM instance.
The kubectl client is connected to the ACK cluster that is added to the ASM instance. For more information, see Obtain the kubeconfig file of a cluster and use kubectl to connect to the cluster.
An ingress gateway is deployed in the ACK cluster. This way, after you deploy an application in the ACK cluster, the application is exposed outside of the ASM instance. For more information, see Create an ingress gateway.
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
Enable automatic sidecar proxy injection for the default namespace. For more information, see Enable automatic sidecar proxy injection.
Download the YAML file of the Bookinfo application from the Istio repository of GitHub.
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
To view the deployment information about the Bookinfo application, perform the following steps:
Log on to the ACK console. In the left-side navigation pane, click Clusters.
On the Clusters page, click the name of the cluster that you want to manage and choose
in the left-side navigation pane.In the upper part of the Pods page, select default from the Namespace drop-down list.
NoteClick 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.