Skip to main content
KaireonAI includes a production-ready Helm chart for deploying to any Kubernetes cluster. This gives you full control over scaling, networking, monitoring, and security.

Prerequisites

  • Kubernetes cluster (1.24+)
  • Helm 3.x installed
  • kubectl configured for your cluster
  • PostgreSQL database (self-managed, RDS, or CloudNativePG)
  • Redis (self-managed, ElastiCache, or included via Helm)

What’s Included

The Helm chart in helm/ provides:
ResourceDescription
API DeploymentMain Next.js application with health checks and HPA
Worker DeploymentBackground job processor for pipelines and model retraining
ML Worker DeploymentPython/FastAPI service for scikit-learn analysis (optional)
ConfigMapsApplication configuration (non-sensitive)
SecretsDatabase URLs, API keys, encryption keys
IngressHTTPS ingress with TLS termination (ALB or nginx)
HPAHorizontal Pod Autoscaler for API pods
PodDisruptionBudgetEnsures availability during node maintenance
NetworkPoliciesRestrict pod-to-pod and egress traffic
ServiceMonitorPrometheus metrics scraping

Quick Install

# Create namespace and secrets
kubectl create namespace kaireon

kubectl create secret generic kaireon-secrets \
  --namespace kaireon \
  --from-literal=DATABASE_URL='postgresql://user:pass@postgres:5432/kaireon' \
  --from-literal=REDIS_URL='redis://redis:6379' \
  --from-literal=NEXTAUTH_SECRET='your-secure-secret'

# Install the chart
helm install kaireon ./helm \
  --namespace kaireon \
  --set api.image.repository=422500312304.dkr.ecr.us-east-1.amazonaws.com/kaireon-api \
  --set api.image.tag=latest \
  --set ingress.host=kaireon.example.com

With ML Worker

To include the ML Worker for AI-powered segmentation, policy analysis, and content intelligence:
helm install kaireon ./helm \
  --namespace kaireon \
  --set api.image.repository=422500312304.dkr.ecr.us-east-1.amazonaws.com/kaireon-api \
  --set api.image.tag=latest \
  --set mlWorker.enabled=true \
  --set mlWorker.image.repository=422500312304.dkr.ecr.us-east-1.amazonaws.com/kaireon-ml \
  --set mlWorker.image.tag=latest \
  --set ingress.host=kaireon.example.com
When 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:
# values.yaml overrides
api:
  replicas: 3
  resources:
    requests:
      cpu: 500m
      memory: 512Mi
    limits:
      cpu: 2000m
      memory: 2Gi
  hpa:
    enabled: true
    minReplicas: 3
    maxReplicas: 20
    targetCPUUtilization: 70

worker:
  replicas: 2
  resources:
    requests:
      cpu: 1000m
      memory: 1Gi
    limits:
      cpu: 4000m
      memory: 4Gi

mlWorker:
  enabled: true
  replicas: 1
  resources:
    requests:
      cpu: 500m
      memory: 1Gi
    limits:
      cpu: 2000m
      memory: 4Gi

ingress:
  enabled: true
  className: alb
  host: app.kaireon.com
  aws:
    certificateArn: arn:aws:acm:us-east-1:...:certificate/...
    scheme: internet-facing

monitoring:
  prometheus:
    enabled: true
  grafana:
    enabled: true
Use --set to override any value:
helm install kaireon ./helm \
  --namespace kaireon \
  --set api.replicas=3 \
  --set mlWorker.enabled=true \
  --set monitoring.prometheus.enabled=true

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

When monitoring.prometheus.enabled=true, the chart deploys:

Prometheus Metrics

KaireonAI exposes metrics at /api/v1/metrics:
MetricTypeDescription
kaireon_decisions_totalCounterTotal decisions made
kaireon_decision_latency_msHistogramDecision latency distribution
kaireon_pipeline_executions_totalCounterPipeline run counts
kaireon_api_requests_totalCounterAPI request counts by endpoint

Grafana Dashboards

Pre-built dashboards are included in helm/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:
database:
  mode: internal
  internal:
    storage: 10Gi
Or use an operator like CloudNativePG:
helm install pg-operator cloudnative-pg/cloudnative-pg --namespace cnpg-system --create-namespace

Amazon RDS (External)

database:
  mode: external
  external:
    host: kaireon-db.cluster-abc.us-east-1.rds.amazonaws.com
    port: 5432
    name: kaireon
    username: admin
    existingSecret: kaireon-db-secret
    sslMode: require

Upgrading

# Update to a new image tag
helm upgrade kaireon ./helm \
  --namespace kaireon \
  --set api.image.tag=$(git rev-parse --short HEAD) \
  --set mlWorker.image.tag=$(git rev-parse --short HEAD)

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.

Next Steps