Skip to main content


Prepare the Testing Environment (AWS EKS)

You can also visit the publicly accessible performance benchmark repository. This repository documents in detail all the resource deployment configurations used for testing as well as the specific configuration information for each test scenario.


Create Cluster

  1. Add a new cluster in AWS EKS:

create cluster

  1. Configure the cluster. If you have not used the EKS service to configure a cluster service role before, you can create an EKS cluster role according to the document.

configuration cluster

  1. Configure network:

configuration cluster networks

  1. Configure observability:

configuration observability

  1. Configure plugin:

configuration cluster plugin

  1. Create cluster:

wait cluster creating

Add Node

Create Key Pairs (Optional)

After configuring Key Pairs in the node, you can log in to the node directly. If you already have Key Pairs, you can skip the step of creating key pairs.

  1. Select "EC2" in the AWS console, enter the EC2 interface, click "Key Pairs" on the left, and click "Create key pair" on the right.

create key pairs

  1. Set key pairs name:

configuration key pairs

  1. Create a key pair. At this time, the browser will automatically download the key pair. This should be saved so that you can use the command to log in to node later.

create key pairs success

Create Node Groups

You will be adding 3 node groups, in which you will deploy API7 EE, NGINX upstream, and wrk2 to different node groups respectively.

Note: If you have not created an EKS Node Role before, you need to create it first. The steps are similar to the process of creating a cluster service role in EKS. See Amazon EKS node IAM role for more details.

  1. Select Compute and click Add node group.

add node group

  1. Configure node group details, such as name and node IAM role.

configure node group details

  1. Select Amazon Linux2 (AL2_x86_64) as the AMI type and c5.4xlarge as the instance type.

configuration EC2

  1. Configure network. If you need to SSH into to the node, configure the node remote access control accordingly.

configuration networks

  1. Repeat the above steps to create 3 Nodes named: api7ee, upstream, wrk2

node info

Configure AWS CLI

  1. Enable kubectl to communicate with the cluster previously created by adding a new context to the kubectl config file. See Creating an Amazon EKS cluster for more details.
aws eks update-kubeconfig --region region-code --name my-cluster
  1. Run kubectl get svc to verify successful communication with the cluster.
kubernetes ClusterIP <none> 443/TCP 39m

Configure K8s Cluster Node Label

Label the nodes:

kubectl label nodes <your-node-name> <label_key=label_value>

# example
kubectl label nodes <your-node1-name> nodeName=api7ee
kubectl label nodes <your-node2-name> nodeName=upstream
kubectl label nodes <your-node3-name> nodeName=wrk2


Install API7 EE

Control Plane

  1. Create a new namespace:
kubectl create namespace api7
  1. Install API7 Control Plane:
helm repo add api7            
helm repo add apisix
helm repo update
# Specify the Node for the api7ee installation (the label we set for the Node earlier).
helm install api7ee3 api7/api7ee3 --set nodeSelector."nodeName"=api7ee --set postgresql.primary.nodeSelector."nodeName"=api7ee --set prometheus.server.nodeSelector."nodeName"=api7ee --set postgresql.primary.persistence.enabled=false --set prometheus.server.persistence.enabled=false -n api7
  1. Check deployment status:
kubectl get svc -owide -l -n api7

api7ee3-dashboard ClusterIP <none> 7080/TCP 18s,,
api7ee3-dp-manager ClusterIP <none> 7900/TCP,7943/TCP 18s,,
  1. Forward the dashboard port to the local machine, log in to the console, and upload the licence:

License Free Trial

kubectl -n api7 port-forward svc/api7ee3-dashboard 7443:7443
  1. Set the Control Plane address:

Log in to the dashboard and configure the "Control Plane Address" in the Gateway Settings: http://api7ee3-dp-manager:7900

gateway settings

Disable Global Plugin prometheus

disable Prometheus

API7 Gateway (Data Plane)

  1. Click the Add Gateway Instance button:

add gateway instance

  1. Select the Kubernetes method:

Select the Kubernetes method and configure the "namespace" to generate an install script and run it. This step will get a token to connect the CP to the DP. For example:

helm install -n api7 --create-namespace api7-ee-3-gateway api7/gateway \
--set "apisix.extraEnvVars[0].name=API7_CONTROL_PLANE_TOKEN" \
--set "apisix.extraEnvVars[0].value=a7ee-1onxEIUNvKhihuwLKIfNvP61QzYisftJp7fwU3MBMNx9W4h1kdbdf9031a24d7448da69b6120a526f902" \
--set "apisix.image.repository=api7/api7-ee-3-gateway" \
--set "apisix.image.tag=" \
--set "[0]=http://api7ee3-dp-manager:7900" \
--set "apisix.replicaCount=1" \
--set "nginx.workerProcesses"=1 \
--set apisix.nodeSelector.nodeName=api7ee \
--set apisix.securityContext.runAsNonRoot=false \
--set apisix.securityContext.runAsUser=0

You should install the Gateway on a separate node and adjust the worker_processes as needed. In addition, if you want to install top and other tools in the gateway container, you can start it as root. For example:

❶ configure gateway worker_process: --set "nginx.workerProcesses"=1

❷ configure node selector: --set apisix.nodeSelector.nodeName=api7ee

❸ run as root user:

  • --set apisix.securityContext.runAsNonRoot=false
  • --set apisix.securityContext.runAsUser=0

Install NGINX Upstream

  1. Create a nginx upstream deployment file:
apiVersion: v1
kind: ConfigMap
name: nginx-config
namespace: api7
nginx.conf: |
master_process on;

worker_processes 1;
events {
worker_connections 4096;

http {
resolver ipv6=off;

#access_log logs/access.log;
access_log off;
server_tokens off;
keepalive_requests 10000000;

server {
listen 1980;
server_name _;

location / {
proxy_set_header Connection "";
return 200 "hello world\n";
apiVersion: apps/v1
kind: Deployment
name: nginx-deployment
namespace: api7
replicas: 1
app: nginx
app: nginx
- name: nginx
image: nginx
- name: nginx-config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
nodeName: upstream
- name: nginx-config-volume
name: nginx-config
  1. Deploy nginx upstream
kubectl apply -f nginx-upstream.yaml

Install wrk2

  1. Create a wrk2 deployment file:
apiVersion: apps/v1
kind: Deployment
name: wrk2-deployment
namespace: api7
replicas: 1
app: wrk2
app: wrk2
- name: wrk2
image: bootjp/wrk2
nodeName: wrk2
  1. Deploy wrk2
kubectl apply -f wrk2.yaml


You can find the configuration for each test scenario in the public performance benchmark repository and create the configuration for each scenario directly using the ADC tool. Logo

API Management for Modern Architectures with Edge, API Gateway, Kubernetes, and Service Mesh.


API7 Cloud

SOC2 Type IRed Herring

Copyright © APISEVEN Ltd. 2019 – 2024. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation