Install testing module in your Cloud
Introduction
API Security testing involves sending malicious API requests to your (staging) server. By default, these malicious testing requests are sent from the Testing module installed within Akto Cloud.
There could be multiple reasons why you'd want to install testing module within your Cloud.
Whitelisting Akto's IP in Security Group or WAF isn't an option
The staging server isn't reachable from public domain
The WAF would block most requests (or block Akto's IP)
The API domain isn't resolvable from public domain
The API is completely internal
Testing from Customer Cloud
Login to Akto dashboard at app.akto.io
Go to Quick Start > Hybrid Saas > Click on “Connect” button
Copy the JWT token (marked in red) [ Also referred as
Database Abstractor Tokenlater]
You can now use a Helm-chart to install Akto Security Testing module in your cloud or install manually
Terraform
To install using Terraform, use the Terraform script here.
Please make sure you install it in a private subnet from your application VPC.
This private subnet should also have network connectivity (typically via NAT).
For
Database Abstractor Service Tokeninput in the terraform script specify the JWT token copied in the earlier step.Once the terraform script has finished running, you should be able to see a new autoscaling group created with 1 Akto Testing EC2 instance running.
Helm-chart
Akto's helm chart installation
Add akto helm repository.
Note: If you've already added akto helm repository, update the helm repository using:
Using the dashboard abstractor token saved in the above steps, deploy the helm chart below.
Note: If you want to modify the helm chart according to your needs, you can clone the same from mini-testing-helm-chart
Setup Autoscaling for Testing Module Pods
If you don't need autoscaling, skip this section.
Autoscaling enables parallel test runs via multiple Kubernetes pods that scale based on workload.
Step 1: Verify Prometheus is Installed
Autoscaling requires Prometheus to collect and query metrics. Choose one of the following options:
Option A: In-Cluster Prometheus (kube-prometheus-stack)
If you have kube-prometheus-stack installed in your cluster, identify these details:
You'll need:
Namespace (e.g.,
monitoring)Service name (e.g.,
prometheus-kube-prometheus-prometheus)Port (e.g.,
9090)
Option B: Grafana Cloud Prometheus
If using Grafana Cloud, you'll need:
Query URL (e.g.,
https://prometheus-prod-XX.grafana.net/api/prom)Username (numeric instance ID)
Read API token
Note: For Grafana Cloud, you'll also need to deploy a metrics collector in your cluster. Contact Akto support for assistance with Grafana Cloud setup.
Important - Metrics Collection Configuration:
When configuring your metrics collector (e.g., Grafana Alloy) for Grafana Cloud, ensure you do not add container labels to scraped metrics. This is critical to prevent metric duplication.
Technical context:
Pods are scraped at the pod IP level (all containers in a pod share the same network namespace)
Only ONE container per pod serves metrics on the specified port
Adding container labels artificially creates duplicate time series for all containers in the pod, even though metrics originate from a single container
Example issue: A pod with 4 containers (app, sidecar, kafka, zookeeper) would generate 4 time series per metric instead of 1, causing incorrect aggregations like avg().
Before deploying to production, verify:
Only ONE container per pod exposes metrics on the annotated port (e.g., port 9400)
The
prometheus.io/portannotation matches the actual metrics endpoint portYour metrics queries do not filter by container label (use
podornamespacelabels instead)Your metrics collector configuration does NOT include rules that add container labels
Example of what to AVOID in your collector configuration:
If you need per-container metrics, configure your collector to scrape at the container level with unique ports for each container.
Step 2: Install KEDA
KEDA monitors Prometheus metrics and automatically scales pods based on workload.
Note: If you get an error Error: UPGRADE FAILED: no RoleBinding with the name "keda-operator" found, simply re-run the upgrade command.
Step 3: Install/Upgrade Akto Mini-Testing
Option A: With In-Cluster Prometheus
Example:
Option B: With Grafana Cloud Prometheus
Example:
Note: For Grafana Cloud setup, contact Akto support for assistance with metrics collection and obtaining credentials.
Verify Autoscaling
Uninstalling
IMPORTANT: Always uninstall Helm releases BEFORE deleting the namespace. Deleting the namespace first will leave orphaned cluster-scoped resources that will cause conflicts when reinstalling.
Correct Uninstall Order
Troubleshooting: Recovering from Incorrect Uninstall
If you deleted the namespace before uninstalling KEDA, you'll encounter errors when trying to reinstall. Follow these steps to recover:
1. Namespace Stuck in Terminating State
2. Clean Up Orphaned KEDA Resources
When a namespace is deleted before uninstalling KEDA, cluster-scoped resources remain with old namespace annotations, causing installation failures.
3. Reinstall KEDA Cleanly
4. Reinstall Mini-Testing
Follow the installation steps from Step 3: Install/Upgrade Akto Mini-Testing above.
Linux VM
Create a new instance with the following requirements
Platform
Linux
Spec
2 vCPU
4GB RAM
20GB Hard disk
Don’t use burstable instances
Network
Private subnet
connectivity to internet (typically via NAT)
connectivity to your staging service
Security groups
Inbound - No ports required
Outbound - Open all
SSH into this new instance in your Cloud
Run
sudo su -Install docker and docker-compose.
Paste the following in
docker-compose-testing.ymlfile. Use token from step(3) for DATABASE_ABSTRACTOR_SERVICE_TOKEN value. Don't use double-quotesRun
docker-compose -f docker-compose-testing.yml up -d.Run
systemctl enable /usr/lib/systemd/system/docker.serviceto ensure Docker starts up in case of instance restarts
Get Support for your Akto setup
There are multiple ways to request support from Akto. We are 24X7 available on the following:
In-app
intercomsupport. Message us with your query on intercom in Akto dashboard and someone will reply.Join our discord channel for community support.
Contact
[email protected]for email support.Contact us here.
Last updated
Was this helpful?