Skip to main content

Dependencies for Testkube

Installing Testkube runs a, Minio and MongoDB instance in your Kubernetes cluster. There is an option to replace some of these with your own instances.


MongoDB is used for storage of Testkube Test results and various Testkube configurations as telemetry settings and cluster ID.

In order to use an external MongoDB instance, follow these steps:

  1. Make sure you have access to the MongoDB you want to connect to - note: newest versions of MongoDB might not work optimally with Testkube, for the best experience, use MongoDB v4.4.12
  2. Install testkube with --set mongo.enabled=false: kubectl testkube install --set mongo.enabled=false
  3. Update MongoDB details for the api-server in the helm values with valid connection string

SSL connections

Inspecting the Testkube api-server manifest shows the following MongoDB-related environment variables:

  • "API_MONGO_DSN" (default:"mongodb://localhost:27017") - connection string
  • "API_MONGO_DB" (default:"testkube") - database name
  • "API_MONGO_SSL_CERT" (no default value) - reference to Kubernetes secret for MongoDB instances with SSL enabled

API_MONGO_SSL_CERT expects the name of a Kubernetes secret containing all the necessary information to establish an SSL connection to the MongoDB instance. This secret has to be in the testkube namespace and should have the following structure:

apiVersion: v1
kind: Secret
name: mongo-ssl-certs
namespace: testkube
type: Opaque
sslCertificateAuthorityFile: <base64 encoded root-ca.pem>
sslClientCertificateKeyFile: <base64 encoded mongodb.pem>
sslClientCertificateKeyFilePassword: <base64 encoded password>

To set this variable on helm-charts level, set mongodb.sslCertSecret to the name of the secret.