Running HTTP virtual services in Kubernetes cluster without using proxies
When you run HTTP virtual services in the Kubernetes cluster of IBM® DevOps Test Hub (Test Hub) or a remote Kubernetes cluster, the endpoint on which the virtual service is exposed externally uses a host name that includes a generated ID. If a client application is required to call the virtual service directly via its external hostname and not via the HTTP proxy, then you might want to determine the hostname to configure the client first before you start the virtual service.
- Ensured that you are assigned a role as a Member or Project Creator in the team space. See Managing members and their roles in a team space.
- Ensured that you are assigned a role as a Project Owner or Tester in the project. See Managing access to the server projects.
- Created a project in a team space on Test Hub and added the repository that contains the HTTP virtual services.
- Completed the prerequisite tasks before you start HTTP virtual services. See Prerequisites for running HTTP virtual services in a Kubernetes cluster.
- Selected the branch of the Git repository to view test resources on the Execution page.
in-<unique_id>.<ingress_domain>For example, with an ingress domain as 10.1.2.3.nip.io, a virtual service endpoint might be as follows:
in-cd3a755635574c6fa7e264911301821a.10.1.2.3.nip.io
<ingress_domain_first_label>-<unique_id>.<remainder_of_ingress_domain>For example, with an ingress domain as dth.mycluster-123456-0000.region.containers.appdomain.cloud, a virtual service endpoint might be as follows:
dth-cd3a755635574c6fa7e264911301821a.mycluster-123456-0000.region.containers.appdomain.cloud
The <unique_id> is generated when the virtual service is started. The full hostname can be viewed in the Routing to field of the routing rule created for the virtual service on the Intercept Rules page. When traffic is routed to the virtual service via the HTTP proxy, a client application is unaware of this hostname. If the client application is required to call the virtual services directly, it must be aware of the hostname of the virtual service.
- The value of the <custom_id> that you specify is used as the <unique_id> for the virtual service.
- The <custom_id> must start and end with an alphanumeric character. The characters supported include a-z, 0-9, and a hyphen. No other characters can be used in the <custom_id>. The <custom_id> must not be longer than 32 characters.
in-stub123-test.10.1.2.3.nip.io
- On the Resources page, the virtual services are displayed with the state as Running along with the number of instances that are running in the Active instances column.
- On the Resources page, you must click the
Show in instances page icon
in the row of the virtual service to view all the running instances of a particular virtual service on the Instances page.
- Go to the Instances page by clicking . You can view instances of all the virtual services that are running and are displayed with the state as Running under the State column. You can also view the requests that are received by the virtual service. The number of requests is displayed as number of hits when you hover the cursor over the text in the Activity column.