After you add an ingress gateway to your ASM instance, you can deploy applications to the associated cluster. This topic describes how to deploy the Bookinfo sample application to an ACK cluster that is associated with an ASM instance.
Prerequisites
-
You have created at least one ASM instance and added at least one ACK cluster to the instance. For more information, see Create an ASM instance and Add a cluster to an ASM instance.
-
You have connected to the ACK cluster in the ASM instance using
kubectl. For more information, see Obtain the cluster kubeconfig and use kubectl to connect to the cluster. -
You have created an ingress gateway for the ACK cluster to expose the sample application to external traffic. For more information, see Create an ingress gateway.
Bookinfo application
This topic uses a sample book review application named Bookinfo. The following figure shows its microservice architecture:
The application consists of the following four microservices:
-
Productpage: This microservice calls the Details and Reviews microservices to generate the page.
-
Details: This microservice contains book information.
-
Reviews: This microservice contains book reviews and calls the Ratings microservice.
-
Ratings: This microservice contains rating information from book reviews.
The Reviews microservice has three versions:
-
Version v1 does not call the Ratings service.
-
Version v2 calls the Ratings service and displays ratings as 1 to 5 black stars.
-
Version v3 calls the Ratings service and displays ratings as 1 to 5 red stars.
Procedure
-
Enable automatic sidecar proxy injection for the
defaultnamespace. For more information, see Enable automatic injection. -
Alternatively, download the Bookinfo YAML file from the Istio repository on GitHub.
-
Run the following command to deploy the Bookinfo application.
kubectl apply -f bookinfo.yaml -
Verify the Bookinfo deployment.
-
Log on to the ACK console. In the left navigation pane, click Clusters.
-
On the Clusters page, click the name of your cluster. In the left navigation pane, click .
-
On the Pods page, select default from the Namespace drop-down list to view the pods for the Bookinfo application.
NoteTo view pod details, click Details in the Actions column.
-
What to do next
You can create a Gateway and a virtual service to access services through the ASM gateway. You can also create a destination rule to route traffic to different versions of a service based on a specified ratio. For more information, see Use Istio resources to implement version-based traffic routing.