Prerequisites
- Kubernetes cluster (1.24+)
- Helm 3.x installed
kubectlconfigured for your cluster- PostgreSQL database (self-managed, RDS, or CloudNativePG)
- Redis (self-managed, ElastiCache, or included via Helm)
What’s Included
The Helm chart inhelm/ provides:
| Resource | Description |
|---|---|
| API Deployment | Main Next.js application with health checks and HPA |
| Worker Deployment | Background job processor for pipelines and model retraining |
| ML Worker Deployment | Python/FastAPI service for scikit-learn analysis (optional) |
| ConfigMaps | Application configuration (non-sensitive) |
| Secrets | Database URLs, API keys, encryption keys |
| Ingress | HTTPS ingress with TLS termination (ALB or nginx) |
| HPA | Horizontal Pod Autoscaler for API pods |
| PodDisruptionBudget | Ensures availability during node maintenance |
| NetworkPolicies | Restrict pod-to-pod and egress traffic |
| ServiceMonitor | Prometheus metrics scraping |
Quick Install
With ML Worker
To include the ML Worker for AI-powered segmentation, policy analysis, and content intelligence:mlWorker.enabled=true, the chart automatically injects ML_WORKER_URL into the API pods — no manual configuration needed.
Configuration
Key Helm values you can customize:--set to override any value:
Architecture
The API communicates with the ML Worker over an internal ClusterIP service (kaireon-ml-worker:8000). The ML Worker reads directly from PostgreSQL for schema data and analysis inputs.
Monitoring Stack
Whenmonitoring.prometheus.enabled=true, the chart deploys:
Prometheus Metrics
KaireonAI exposes metrics at/api/v1/metrics:
| Metric | Type | Description |
|---|---|---|
kaireon_decisions_total | Counter | Total decisions made |
kaireon_decision_latency_ms | Histogram | Decision latency distribution |
kaireon_pipeline_executions_total | Counter | Pipeline run counts |
kaireon_api_requests_total | Counter | API request counts by endpoint |
Grafana Dashboards
Pre-built dashboards are included inhelm/dashboards/:
- API Overview — Request rates, latency percentiles, error rates
- Decision Engine — Decision throughput, scoring latency, cache hit rates
- Infrastructure Health — CPU, memory, pod restarts, network
- Model Health — Model prediction distributions, feature drift
- Worker Queues — Queue depth, processing times, failure rates
Database Options
Self-Managed PostgreSQL
Deploy PostgreSQL inside the cluster. The chart includes an internal PostgreSQL StatefulSet by default:Amazon RDS (External)
Upgrading
Rate Limiting & Circuit Breakers
- Rate limiting — KaireonAI protects API endpoints with a sliding-window rate limiter backed by Redis. You configure limits per endpoint via environment variables or platform settings.
- Circuit breakers — External integrations (connectors, webhooks) use circuit breaker patterns to prevent cascade failures. States cycle: closed → open → half-open.