Kubernetes Installation
Apinizer modules can be installed on Kubernetes using two different methods: with raw Kubernetes Manifest YAML files or with Helm chart. From the top tabs below you can select your preferred deployment method, and from the inner tabs you can select the module you want to install. Each module has its own resource requirements, environment variables and service definitions.
Installation Flow
Follow this sequence to install Apinizer modules on Kubernetes:
Required for Manager metadata, deployed proxy snapshots, and Integration scheduler queue. See MongoDB Installation.
Apinizer Management Console. API Traffic Managers and API administration operate through this application. License key is loaded via this module.
The actual API Gateway. Must be defined as at least one environment through API Manager. Can be deployed as Managed (under Apinizer control) or Remote (external cluster).
Optional Modules
After completing the mandatory steps above, you can optionally deploy the following modules based on your requirements:
Shared Hazelcast cache. Recommended for rate limit, JWT cache, cluster-wide state. Can be deployed as Managed or Remote. Learn more
Quartz-based task scheduler. For scheduled API calls and batch jobs. Learn more
Developer portal for the API catalog. API consumers create tokens and discover APIs. Learn more
Recommended for indexing high-volume API traffic logs. Without it, logs are written to MongoDB. Learn more
HTTPS termination for Manager. Learn more
Pick your preferred deployment method (Manifest YAML or Helm chart) from the tabs below; both follow the same steps.
- Kubernetes Manifest
- Helm
Install Apinizer modules on a cluster step by step using raw Kubernetes Manifest (YAML) files. This method provides full control over the cluster; it applies Deployment, Service, ConfigMap, Secret, RBAC and Ingress definitions for each module as separate files. It does not use a package manager like Helm; it works directly with kubectl apply -f.
API Manager and Gateway installations are mandatory — the actual API Gateway of Apinizer is this Gateway module. Follow the steps below in order: API Manager must be up first, then at least one Gateway must be installed and defined as an environment through the Manager. Cache, Integration and API Portal modules are optional and can be installed from the tabs at the bottom of the page.
API Manager Installation
The Apinizer Management Console (API Manager) is the component through which Apinizer is managed. API Traffic Managers, those who manage APIs, and API consumers can perform their necessary operations through this application.
After Apinizer images are deployed to Kubernetes environment, you need to add the License Key provided to you by Apinizer to the database.
Pre-Installation Steps
MongoDB installation is mandatory — you must have a running MongoDB instance before bringing up Apinizer. Manager metadata, deployed proxy snapshots, Integration scheduler queue, and audit records all live on MongoDB. This dependency does not change whichever runtime (Kubernetes, Docker, or Virtual Server) you pick.
A replica set is recommended for production; a single node is only suitable for PoC / development. For installation steps → continue at MongoDB Installation.
Elasticsearch is important for API traffic log indexing and search; it is optional. Without Elasticsearch, traffic logs are written to MongoDB — Elasticsearch is recommended for high-traffic environments. For details → see Elasticsearch Installation.
Defining Kubernetes Permissions and Creating Namespaces
Kubernetes API permissions need to be defined for Apinizer to access pods in the created Namespace.
In Kubernetes, ClusterRole and ClusterRoleBinding provide role and role assignment mechanisms at the Kubernetes cluster level. These two resources enable cluster administrators and application developers to manage access and permissions to Kubernetes resources.
If Environment management will be done through API Manager, permissions need to be defined for Apinizer to access Kubernetes APIs and perform create, delete, update and watch operations on Namespace, Deployment, Pod, Service.
If Kubernetes management is done with Apinizer
In the following step, Roles and RoleBindings are created on Kubernetes and permissions are defined. Permission is granted for all environments that will be created in this step.
apinizer-role.yaml — Apinizer namespace + RBAC
apiVersion: v1
kind: Namespace
metadata:
name: apinizer
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: apinizer-role-binding
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: apinizer-role
subjects:
- apiGroup: rbac.authorization.k8s.io
kind: Group
name: system:serviceaccounts
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: apinizer-role
rules:
- apiGroups:
- ''
resources:
- nodes
- services
- namespaces
- pods
- endpoints
- pods/log
- secrets
- configmaps
verbs:
- get
- list
- watch
- update
- create
- patch
- delete
- apiGroups:
- apps
resources:
- deployments
- replicasets
- statefulsets
- configmaps
verbs:
- get
- list
- watch
- update
- create
- patch
- delete
kubectl apply -f apinizer-role.yaml
If Kubernetes management is not done with Apinizer
Here, permissions are set only for the manager application in the Apinizer namespace.
apinizer-manager-role.yaml — Manager-only namespace + RBAC
apiVersion: v1
kind: Namespace
metadata:
name: apinizer
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: manager-serviceaccount
namespace: apinizer
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: apinizer-role
namespace: apinizer
rules:
- apiGroups:
- ''
resources:
- services
- namespaces
- pods
- endpoints
- pods/log
- secrets
verbs:
- get
- list
- watch
- update
- create
- patch
- delete
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: manager-serviceaccount-apinizer-role-binding
namespace: apinizer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: apinizer-role
subjects:
- kind: ServiceAccount
name: manager-serviceaccount
namespace: apinizer
kubectl apply -f apinizer-manager-role.yaml
Configuration Parameters
API Manager is a web-based management interface where APIs, Policies, Users, Credentials and configurations are defined, and API Traffic and Analytics data are viewed and analyzed. Configure the following variables according to your environment before deploying API Manager to Kubernetes.
- APINIZER_VERSION - Parameter indicating which Apinizer version you will install. Click here to see current versions. It is recommended to always use the latest version in new installations. Click here to review release notes.
- MONGO_DBNAME - Database URL information to be used for Apinizer configurations. It is recommended to use the name "apinizerdb" by default.
- MONGOX_IP and MONGOX_PORT - IP and port information of MongoDB servers. MongoDB default port is 25080. Apinizer uses port 25080 by default.
- MONGO_USERNAME and MONGO_PASSWORD - Information about the user defined for Apinizer in your MongoDB application, who is authorized on the relevant database or has the authority to create that database.
- YOUR_LICENSE_KEY - License key sent to you by Apinizer.
- K8S_ANY_WORKER_IP - An IP from your Kubernetes Cluster is required for you to access the Apinizer Management Console interface from any web browser after Apinizer installation is completed. This is usually preferred as one of the Kubernetes Worker servers and it is recommended to be placed behind a Load Balancer and DNS later.
Creating secret with MongoDB information
It is recommended that your MongoDB database connection information be stored in an Encoded form in kubernetes deployments. For this, apply the following steps in the terminal of a Linux-based operating system.
DB_URL='mongodb://<MONGO_USERNAME>:<MONGO_PASSWORD>@<MONGO1_IP>:<MONGO1_PORT>,<MONGO2_IP>:<MONGO2_PORT>,<MONGO3_IP>:<MONGO3_PORT>/?authSource=admin&replicaSet=apinizer-replicaset'
DB_NAME=<MONGO_DBNAME> # Our default recommendation for <MONGO_DBNAME> variable is the name "apinizerdb"
echo -n ${DB_URL} | base64 # We will put the output of this in place of <ENCODED_URL> variable in the next step
echo -n ${DB_NAME} | base64 # We will put the output of this in place of <ENCODED_DB_NAME> variable in the next step
vi secret.yaml
Preparing secret yaml with MongoDB information:
mongo-secret.yaml — MongoDB connection secret
apiVersion: v1
kind: Secret
metadata:
name: mongo-db-credentials
namespace: apinizer
type: Opaque
data:
dbUrl: <ENCODED_URL>
dbName: <ENCODED_DB_NAME>
kubectl apply -f secret.yaml
API Manager Kubernetes deployment
Modify the following example yaml file according to your systems and load it to your Kubernetes Cluster.
vi apinizer-manager-deployment.yaml
apimanager-deployment.yaml — API Manager Deployment + Service
apiVersion: apps/v1
kind: Deployment
metadata:
name: apimanager
namespace: apinizer
spec:
replicas: 1
selector:
matchLabels:
app: apimanager
version: v1
strategy:
type: Recreate
template:
metadata:
labels:
app: apimanager
version: v1
spec:
containers:
- env:
- name: JAVA_OPTS
value: '-XX:MaxRAMPercentage=75.0 -Dlog4j.formatMsgNoLookups=true'
- name: SPRING_PROFILES_ACTIVE
value: prod
- name: WORKER_DEPLOYMENT_TIMEOUT
value: '120'
- name: SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE
value: '70MB'
- name: SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE
value: '70MB'
- name: SPRING_DATA_MONGODB_URI
valueFrom:
secretKeyRef:
key: dbUrl
name: mongo-db-credentials
- name: SPRING_DATA_MONGODB_DATABASE
valueFrom:
secretKeyRef:
key: dbName
name: mongo-db-credentials
name: apimanager
image: apinizercloud/apimanager:<APINIZER_VERSION>
imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: 1
memory: 3Gi
startupProbe:
failureThreshold: 12
httpGet:
path: /apinizer/management/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
readinessProbe:
failureThreshold: 12
httpGet:
path: /apinizer/management/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
livenessProbe:
failureThreshold: 12
httpGet:
path: /apinizer/management/health
port: 8080
scheme: HTTP
initialDelaySeconds: 60
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 10
dnsPolicy: ClusterFirst
restartPolicy: Always
hostAliases:
- ip: "<IP_ADDRESS>"
hostnames:
- "<DNS_ADDRESS_1>"
- "<DNS_ADDRESS_2>"
If Environments Will Not Be Managed Through Apinizer, Manager's Deployment is Changed
To enable Deployment objects to bind to the required ServiceAccount, the serviceAccountName field is added to the spec field as follows:
spec:
serviceAccountName: manager-serviceaccount
Environment Variables
Apinizer API Manager runs on Spring Boot infrastructure. In Spring Boot, Environment variables are usually expressed using underscore (_) and uppercase. Therefore, for example, when setting spring.servlet.multipart.max-file-size and spring.servlet.multipart.max-request-size properties as environment variables, you may need to use underscore.
Example: You can define SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE and SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE as environment variables.
If you are using a proxy server like NGINX and want to increase the file upload limit, you need to add the following setting to the NGINX configuration file:
http {
...
client_max_body_size 70M; # 70MB file limit
...
}
Environment Variables
Deployment operations are performed synchronously to ensure data integrity. The WORKER_DEPLOYMENT_TIMEOUT parameter indicates how many seconds after the deploy operation performed through API Manager or Management API will timeout.
env:
- name: WORKER_DEPLOYMENT_TIMEOUT
value: '120'
Create Kubernetes Service for API Manager:
vi apinizer-manager-service.yaml
apimanager-service.yaml — API Manager Service
apiVersion: v1
kind: Service
metadata:
name: apimanager
namespace: apinizer
labels:
app: apimanager
spec:
selector:
app: apimanager
type: NodePort
ports:
- name: http
port: 8080
nodePort: 32080
kubectl apply -f apinizer-manager-deployment.yaml
kubectl apply -f apinizer-manager-service.yaml
When API Manager is deployed on Kubernetes, it creates a Kubernetes service named manager and of type NodePort. This service is necessary for accessing API Manager from outside kubernetes. However, you can delete this service and adapt it according to the structure you use for connection method in your organization, such as Ingress.
After this operation, to track the created pod and examine its log, run the first code below to get the pod name and use it in the second code.
kubectl get pods -n apinizer
kubectl logs <POD_NAME> -n apinizer
After Apinizer images are deployed to Kubernetes environment, you need to add the License Key provided to you by Apinizer to the database.
Entering API Manager license key
The License Key provided to you by Apinizer can be updated in a .js file as follows and the license information in the database can be updated.
vi license.js
db.general_settings.updateOne(
{"_class":"GeneralSettings"},
{ $set: { licenseKey: '<YOUR_LICENSE_KEY>'}}
)
The created license.js is run on the MongoDB server. A result showing Matched = 1 is expected.
mongosh mongodb://<MONGODB_IP>:<MONGO_PORT>/<MONGO_DBNAME> --authenticationDatabase "admin" -u "apinizer" -p '<MONGO_PASSWORD>' < license.js
If the installation process was successful, you can access Apinizer API Manager (Management Console) from the following address.
http://<K8S_ANY_WORKER_IP>:32080
Default Username: admin
Default User Password: Request help from Apinizer support team.
It is recommended that you change your password after your first login to Apinizer Management Console.

To run Apinizer Manager with HTTPS/SSL — for TLS certificate preparation, JKS/PKCS12 conversion, K8s Secret creation, and SSL-enabled Deployment YAML examples, see the Starting API Manager with SSL tab at the bottom of the page. HTTPS is optional; TLS is recommended for production but HTTP works for PoC.
Next Step — Gateway Installation (Mandatory)
Once API Manager installation and License Key definition are complete, you can log in to the Management Console. The next step is Gateway installation and environment definition — this step is mandatory; this module is the actual API Gateway of Apinizer and must be defined as at least one environment through the Manager.
The API Gateway is the most important component of Apinizer. It is the point where client requests are received and acts as a Policy Enforcement Point, processing incoming requests according to defined policies and routing them to the relevant Backend API/Service. Gateway installation is mandatory and at least one Gateway must be defined through the Manager.
A Gateway can be defined in two ways:
- Managed Gateway — Apinizer manages the target Kubernetes cluster; when you create an environment via the Manager UI, Apinizer automatically handles namespace, RBAC, Deployment, Service, and secret copy operations.
- Remote Gateway — The cluster where the Gateway runs is NOT under Apinizer's management. The operator manually deploys YAML manifests via
kubectland registers the connection addresses to Manager as a "Remote Gateway".
- Managed Gateway (Apinizer-managed)
- Remote Gateway (Manual Deploy)
What is Managed Gateway?
The model where Apinizer takes both the Management and Provisioning roles in the Kubernetes cluster. When you create a new Gateway environment from the Manager UI, Apinizer:
- Creates the target namespace
- Applies the required
Role,ServiceAccount, andRoleBindings - Deploys the
Gatewayand (if used)CacheDeployments - Exposes HTTP/HTTPS
Services and optionalNodePorts - Copies the MongoDB secret to the target namespace
- Lets you control pod count, JVM parameters, and resource limits via the UI
This model is recommended as the fastest path from PoC to production. No manual YAML preparation.
Prerequisites
Logged into API Manager with the admin user. If Manager is not installed, continue from the API Manager Installation section above.
In System Settings → General Settings, the "Kubernetes management via Apinizer" option must be enabled. When disabled, Manager can only create Remote Gateways.
For Manager to deploy to the target cluster, the apinizer-role.yaml and apinizer-manager-role.yaml (cluster-wide) from the API Manager Installation step must be applied.
The cluster must be able to pull apinizercloud/worker:<APINIZER_VERSION> and apinizercloud/cache:<APINIZER_VERSION> images (via internet or internal registry).
Creating a New Gateway
In the Manager UI, navigate to Server Management → Gateway Runtimes and click the New button. The form has the following sections.

1. Platform Selection
The first step is choosing which platform the Gateway will run on.
| Option | Description |
|---|---|
| Kubernetes | Gateway runs as a pod in a Kubernetes cluster. Can be managed by Apinizer (Managed) or by the operator (Remote). |
| Virtual Server / Docker (Standalone) | Gateway runs as a bare-metal Linux process or Docker container. Always defined as Remote in this case. |
For Managed Gateway, select Kubernetes.
2. Management Type
| Option | Description |
|---|---|
| Managed by Apinizer | The Manager UI auto-creates all Kubernetes objects. |
| Remote Gateway | The operator manually deploys YAML; Manager only stores connection info. |
This tab assumes Managed by Apinizer is selected.
3. Basic Information
| Field | Description | Validation |
|---|---|---|
| Environment Type | Classification such as DEV, TEST, PROD. | Required |
| Communication Protocol Type | HTTP, HTTPS, gRPC, WebSocket. A single environment runs a single protocol; for mixed protocols, create separate environments. | Required |
| Environment Name | Display name of the Gateway environment. Also used as the Kubernetes namespace. | a-z 0-9 and -; 3-64 chars; unique |
| Environment Key | Used as the path prefix in API URLs (e.g., /test/...). | a-zA-Z -; 3-24 chars; unique |
| Access URL | Public URL used to reach this Gateway from outside (Load Balancer / Ingress / NodePort host). | Required |
| Description | Operator notes. | Optional |
4. Node Management (Node List)
To restrict which Kubernetes nodes Gateway pods run on, specify a nodeSelector/nodeAffinity list. If left empty, the Kubernetes scheduler default behavior applies.
In high-traffic environments, running Gateway on dedicated nodes reduces noisy-neighbor effects.
5. Gateway Resource Configuration
| Field | Description | Default |
|---|---|---|
| Replica Count | Number of Gateway pods running concurrently. ≥ 2 recommended for production. | 1 |
| CPU Limit | CPU limit per pod (cores). | 4 |
| Memory Limit | Memory limit per pod. | 4 |
| Memory Unit | Mi / Gi. | Gi |
When the CPU value changes, Apinizer auto-computes JVM tuning parameters (tuneWorkerThreads, tuneIoThreads, etc.) and reflects them in the Additional Variables table.
6. Host Aliases
IP ↔ hostname mappings to add to Gateway pods' /etc/hosts. Define these when the backend runs in a closed environment without DNS resolution, or when hardcoded IP/host mappings are required. This option is only available for Managed Gateway — for Remote Gateway, host aliases are configured directly in the Deployment YAML.