Registering a remote Kubernetes cluster

You must register a remote Kubernetes cluster to your team space on HCL OneTest Server before you add the remote cluster to your project.

Before you begin

You must have completed the following tasks:
  • Verified that the Kubernetes cluster that you want to use is a supported one by referring to the OS, platform, and containers that are specified for HCL OneTest Server in System Requirements.
  • Kept a suitable kubeconfig file with access to the remote Kubernetes cluster in a folder on the computer that you want to use to access an instance of HCL OneTest Server.
  • 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 server projects.

Procedure

  1. Log in to HCL OneTest Server.

    The team space that contains your project is displayed.

  2. Click Infrastructure > Agents and Intercepts in the navigation pane.

    The Agents and Intercepts page is displayed.

  3. Click Add new > Add new cluster.

    The New cluster dialog box is displayed.

  4. Perform the following steps to add the kubeconfig file:
    1. Click Browse, and locate the kubeconfig file of the Kubernetes cluster that you want to add.
    2. Select the kubeconfig file, and then click Open.

      The name of the kubeconfig file that you selected is displayed along with the address of the Kubernetes cluster that is specified in the file.

    3. Click Next.
    The address of the Kubernetes cluster that is configured in the kubeconfig file is displayed in the Address field.
    Note: You can change the address of the Kubernetes cluster if it is different from the address in the kubeconfig file.
  5. Perform the following steps to add a namespace and name for the cluster:
    1. Enter the namespace of the cluster in the Namespace field.
    2. Enter a name for the cluster in the Name field.

      The name helps you to identify the cluster.

    3. Click Next.
  6. Optionally, perform the following steps to enter the code snippets for nodeSelectors and tolerations, if applicable for the remote cluster:
    1. Enter the code snippet for nodeSelectors in a yaml format in the Node selectors field.
    2. Enter the code snippet for tolerations in a yaml format in the Tolerations field.
    3. Click Register.
    The remote cluster is added to the team space and is displayed with the image of the cluster icon icon in the Type column on the Agents and Intercepts page. You can identify the cluster with its name in the Agents column.
    Note: The Projects column does not display any projects that are associated with the cluster yet.

Results

You have registered a remote Kubernetes cluster with your team space on HCL OneTest Server.

What to do next

You must add the remote cluster to your project in your team space before you use the remote cluster as a location to run tests in your project. See Registering a remote Kubernetes cluster.