Recording HTTP traffic in Istio
When you have deployed applications in an Istio service mesh in a Kubernetes cluster and you want to record the communications between the services, you can record the HTTP traffic in Istio in Rational® Integration Tester.
Prerequisites to using the Istio service mesh
- Setting up the Istio control plane on Kubernetes in your IT infrastructure. For more information, refer to the Istio documentation.
- Installed Istio V1.4 or later.
- Installed the kubeconfig file on the computer where you have installed Rational®
Integration Tester to enable successful communications between Rational®
Integration Tester and the Kubernetes cluster. Note: Rational® Integration Tester searches for the kubeconfig file called config in the $HOME/.kube directory, which is the default location. If the location of the kubeconfig is different from the default location, then you must have specified the path to the config file in the environment variable KUBECONFIG. For more information about using kubeconfig files, refer to Organizing Cluster Access Using kubeconfig Files.
Recording HTTP traffic
- Requests received by services in the Istio service mesh.
- Requests sent from namespaces in the Istio service mesh to external services that are not in the Istio service mesh.
Task flow for recording the HTTP traffic in Istio
Task | More information | |
---|---|---|
1 |
Set up Istio. |
|
2 |
Create a logical HTTP connection. |
|
3 |
Create a physical web server resource for an HTTP transport. |
|
3.1 |
Provide the host and port of the service to record, in the Host field and the service port number in the Port field in the Settings tab in the Web Server dialog box.
Notes:
|
Step 3. |
3.2 |
Provide the Istio enabled namespace to record HTTP traffic in the Kubernetes namespace field in the Recording tab in the Web Server dialog box. For example, if the host is reviews.bookinfo.svc.cluster.local and the recording namespace is test-system, then requests made from clients in the test-system namespace to reviews.bookinfo.svc.cluster.local are recorded. When you want to record a service external to the Istio service mesh, the namespace provided in the Recording tab is the namespace in which requests made to that service is recorded. Restriction: The Test Transport action is not supported for Kubernetes services because the web server configured in the settings tab is a service within the Kubernetes cluster and the host and port that are configured are not reachable to Rational® Integration Tester.
|
Step 8 |
5 |
Configure the Recording Port and Recording Bind Address on the Application page of the Library Manager.
Notes:
|
Working with Library Manager |
6 |
In the Recording Studio, you must create an event monitor to monitor the transport or operation (that uses the transport), and then start the recording. Notes:
|
Recording HTTP and HTTPS traffic |
Result
You recorded HTTP messages sent by the namespace in the Istio service mesh or received by Istio enabled services on the configured port. You recorded the HTTP messages in any Kubernetes cluster including the cluster that hosts Rational® Test Automation Server.
What to do next
You can create stubs from the recorded events by using the Recording Studio. See Stub creation by using the Recording Studio.