This article will guide you through how to use Istio to inject Sidecars into the Bookinfo application and explore observability features.
Before you begin, make sure:
Go to Platform Management, navigate to Service Mesh > Service Meshes, and click on the service mesh name to enter the details page. In the Namespaces section, click Managed Namespace. Select demo-dev
and click Confirm.
Deploy using kubectl
Open the container platform or platform management page, and click the kubectl
tool in the bottom right corner.
Apply the YAML file
Paste the following script into the terminal and execute it:
Confirm successful injection
Navigate to Service Mesh, and in the Services, you should see that the Sidecar injection is Enabled
for all four Bookinfo services.
Generate traffic
To explore the observability features, the Bookinfo application needs traffic so that Istio can collect metrics and traces from the services. Use the following script to generate traffic.
**Note: ** Replace GATEWAY_IP_PORT
with the actual IP of your ingress gateway. We have previously obtained the GATEWAY_IP_PORT
in the [Accessing Bookinfo] section.
Save the following script as send-requests.sh
Make the script executable and run it:
This will send a request to the Bookinfo product page every 1 second. After a while, you can explore the observability features in the UI.
Service Topology
After running the traffic generation script for 1–5 minutes, navigate to Service Mesh > Topologies. Here, you can see the topology showing the dependencies between the ingress gateway and the four Bookinfo services. You can also view metrics related to traffic and error rates on the topology graph.
Click on the link between the public-ingressgw
and productpage
nodes in the topology. Traffic Info between them will appear on the right side of the topology.
Trace Details
On the Traffic Info page, click View Tracing to open the trace details page. The query time and parameters will be autopopulated. The Span list on the left side will display Span data that matches the query conditions.
Click on any Span to view the complete Trace data on the right side.
Click View Log in the Trace data to check the persistent log data of the Pods involved in the trace.