Testing internal services in Kubernetes

After you set up a Kubernetes cluster, you can use HCL DevOps Test Integrations and APIs (Test Integrations and APIs) to test the internal services or applications that are running in Kubernetes, and are not exposed through an ingress gateway to external clients.

When you set up a Kubernetes cluster that runs various services, you can use Test Integrations and APIs to create tests or stubs to test the applications or service endpoints owned by the Kubernetes services. Test Integrations and APIs supports testing of the applications that use HTTP or HTTPS transports for communication.

You can also test the databases that are running in a Kubernetes cluster by creating a JDBC connection between Test Integrations and APIs and the database in the cluster. See Testing databases that are in a Kubernetes cluster.

Prerequisites

You must have completed the setting up of a Kubernetes cluster in your IT infrastructure and ensured that various services run in the Kubernetes cluster.

You must have a suitable kubeconfig file with access to the Kubernetes cluster in a folder on the computer on which you installed Test Integrations and APIs. The kubeconfig file must contain the following details:
  • The name of the service or application that you want to test.
  • The namespace that contains the service or application.
    Note: If you do not provide a namespace, Test Integrations and APIs considers the default value of the namespace as default.
  • The certificate details of the Kubernetes cluster that are required to authenticate the connection requests from Test Integrations and APIs.

Task flow for testing internal services in Kubernetes

You can find information about the tasks that you can follow to test the internal services in Kubernetes.

Task Go to...
Configure the Kubernetes cluster as a physical resource to connect from Test Integrations and APIs in the Physical View tab of the Architectural perspective. Configuring a physical connection to a Kubernetes cluster
Synchronize the application resources owned by an internal service of a Kubernetes cluster. Synchronizing application resources of a Kubernetes cluster service in DevOps Test Integrations and APIs
Run the tests and stubs created by using the synchronization feature in Test Integrations and APIs. Running tests and stubs