Configuring a physical connection to a Kubernetes cluster
When you want to test internal services in a Kubernetes cluster by using HCL OneTest™ API, you must first configure the physical connection to a Kubernetes cluster in HCL OneTest™ API.
Before you begin
You must have completed the following tasks:
- Completed setting up of the latest version of a Kubernetes cluster in your IT infrastructure and ensured that various services run in the Kubernetes cluster.
- Configured a kubeconfig file with access to the Kubernetes cluster in a folder on the computer on which you installed HCL OneTest™ API.
Procedure
- Open the Physical View of the Architecture School perspective.
-
On the toolbar of the Physical View, click .
The New Kubernetes Cluster dialog is displayed with the Config tab open.
-
Enter a name for the connection to the Kubernetes cluster in the
Name field.
Note: When you assign a name, it helps you to identify the connection if there are multiple Kubernetes connections in your project.
-
Perform the following steps to import the details from the
kubeconfig file:
-
Enter the namespace in the Kubernetes cluster that contains the service that you want
to test in the Namespace field.
Note: If you do not provide a namespace, HCL OneTest™ API considers the default value of the namespace as default.
-
Click Test Connection to verify that the connection works.
You can close the dialog that is displayed after the connection is validated.
- Click OK.
Results
You configured the physical connection to the Kubernetes cluster in your project.
What to do next
You can use the synchronization feature in HCL OneTest™ API to synchronize with the application that is owned by the service in the Kubernetes cluster. See Synchronizing application resources of a Kubernetes cluster service in HCL OneTest API.