Istio Recording
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 use HCL OneTest™ API to record the HTTP traffic in Istio.
Prerequisites to using the Istio service mesh
You must have completed the following tasks:
- 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 HCL OneTest™ API to enable successful communications between HCL OneTest™ API and the Kubernetes cluster. HCL OneTest™ API searches for the kubeconfig file called config in the $HOME/.kube directory, the default location. If the location of the kubeconfig is different from the default location, then you must specify 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
You can record the following types of requests received or sent by the Istio service mesh:
- 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
The task flow helps you to use the information in the topics for
completing the task to record the HTTP traffic in Istio..
Task | More information | |
---|---|---|
1 |
Set up Istio. | Istio Documentation |
2 |
Create an HTTP transport. | Creating HTTP transports |
3 |
Create a logical HTTP connection. | Creating logical HTTP connections |
4 |
Create a physical Web Server resource for an HTTP transport. | Creating physical web server resources |
4.1 |
Provide the name of the service that is receiving the traffic 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. | Step 3 |
4.2 |
Provide the namespace for the service to
record in the Kubernetes cluster in the Kubernetes
namespace field in the Recording tab in the Web Server dialog
box. Note: As the Web Server configured in the settings tab is a service within
the Kubernetes cluster, the Test Transport action does
not complete the test because the host and port configured are not reachable to
HCL OneTest™ API. |
Step 8 |
5 |
Configure the Recording Port and Recording
Bind Address in the Application page of the
Library Manager.
Notes:
|
Working with Library Manager |
6 |
In the Recording Studio, 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 are recording HTTP messages sent by the namespace in the Istio service mesh or received by Istio enabled services on the configured port in a Kubernetes cluster.
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.