Kubernetes Setup
Deploy ABAXUS inside your Kubernetes cluster using Helm.
Prerequisites
Before deploying ABAXUS:
- Kubernetes 1.27 or later
- Helm 3.12 or later
- A PostgreSQL 14+ database (managed or self-hosted)
- Stripe or Adyen credentials (configured after initial deployment)
- At least 2 CPU cores and 2Gi memory available in your cluster
Installing with Helm
Add the ABAXUS Helm repository:
| |
Create a values file for your environment:
| |
Install:
| |
Environment Variables
The Helm chart creates a Kubernetes Secret and mounts all sensitive values as environment variables. You can also manage these manually if you prefer external secret management (External Secrets Operator, Vault Agent, AWS Secrets Manager):
| Variable | Required | Description |
|---|---|---|
DATABASE_URL | Yes | PostgreSQL connection string |
API_MASTER_KEY | Yes | 32+ character random string used to derive API keys |
STRIPE_SECRET_KEY | Conditional | Stripe secret key (required if using Stripe) |
STRIPE_WEBHOOK_SECRET | Conditional | Stripe webhook signing secret |
ADYEN_API_KEY | Conditional | Adyen API key (required if using Adyen) |
ADYEN_MERCHANT_ACCOUNT | Conditional | Adyen merchant account name |
REDIS_URL | No | Redis connection string for response caching |
LOG_LEVEL | No | debug, info, warn, error (default: info) |
PORT | No | HTTP port (default: 8080) |
See the Configuration Reference for the complete list.
Health Checks and Readiness Probes
ABAXUS exposes health endpoints for Kubernetes probes:
| |
/healthz— returns200if the process is alive and can handle requests. Returns503if the database connection is lost./readyz— returns200if the server is ready to accept traffic, including if all startup migrations have completed. Returns503during the initial startup migration phase.
ABAXUS runs database migrations automatically on startup. The readiness probe ensures no traffic is routed to a pod until migrations complete.
Database Migrations
Migrations run automatically when the API server starts. They are safe to run concurrently — ABAXUS uses advisory locks to ensure only one migration runner proceeds at a time, even if multiple replicas start simultaneously.
To run migrations manually (e.g., in a CI pipeline before deploying a new version):
| |
The Operator Pattern (CRDs)
For teams that prefer GitOps-style infrastructure management, ABAXUS supports a Kubernetes Operator with Custom Resource Definitions (CRDs) for billing configuration. This lets you manage metrics, price plans, and other ABAXUS configuration as Kubernetes manifests in your Git repository.
Install the operator:
| |
Create a metric via CRD:
| |
Apply it:
| |
The operator syncs CRD state to the ABAXUS API automatically. Changes to the CRD are reflected in ABAXUS within seconds. This approach is particularly useful for teams that already manage infrastructure as code and want billing configuration in the same workflow.