Kubernetes Install
This installs the whole platform into a cluster you control: the backend API, the agent service, the web app, a local model server, MongoDB and Redis. Nothing in the install depends on a particular cloud provider.
Chart: helm/changents-ai (version 2.1.0). Requires Kubernetes 1.25+ and Helm 3.
What runs where
| Component | Kubernetes object | Image | Notes |
|---|---|---|---|
| Backend API | Deployment + Service | ghcr.io/vemaya-asia/changents-ai/backend | All governance (halts, releases, guardrails) is enforced here |
| Agent service | Deployment + Service | ghcr.io/vemaya-asia/changents-ai/python-service | Tool-using agents; rehearsal mode withholds side effects |
| Web app | Deployment + Service | ghcr.io/vemaya-asia/changents-ai/frontend | Also serves these docs at /docs/. Optional (frontend.enabled) |
| Model server | Deployment + PVC + Service | docker.io/ollama/ollama:0.5.7 | Text, embedding and vision models inside the cluster |
| MongoDB | StatefulSet | docker.io/library/mongo:7.0 | Or your own (mongodb.enabled=false, set MONGODB_URI) |
| Redis | StatefulSet | docker.io/library/redis:7.2-alpine | Or your own (redis.enabled=false, redis.externalHost) |
Only the web app and the backend's /api and /health paths are exposed through the ingress. The agent service, model server, database and cache stay inside the namespace, and the default network policy allows traffic only between platform pods and cluster DNS.
Images
The platform images are private. Create a pull secret from the read-only token issued with your licence:
kubectl create namespace changents
kubectl -n changents create secret docker-registry changents-pull \
--docker-server=ghcr.io --docker-username=<user> --docker-password=<token>and pass --set global.imagePullSecrets[0].name=changents-pull.
No pull token, or no route to ghcr.io? Ask for the image archive for your release instead, and load it into your registry mirror:
scripts/onprem/import-images.sh changents-images-1.0.3-amd64.tar.gz registry.internal.exampleThe archive holds all seven images (the three platform images, the model server, MongoDB, Redis and nginx) and comes with a SHA-256 checksum that the script verifies.
Pin the release you were issued: set backend.image.tag, pythonService.image.tag and frontend.image.tag to it (for example 1.0.2). The chart's built-in default is only a fallback.
1. Create the Secret
The chart never generates production credentials. Create them yourself:
kubectl -n changents create secret generic changents-secrets \
--from-literal=JWT_SECRET="$(openssl rand -hex 32)" \
--from-literal=SESSION_SECRET="$(openssl rand -hex 32)" \
--from-literal=ENCRYPTION_KEY="$(openssl rand -hex 32)" \
--from-literal=AUDIT_CHAIN_KEY="$(openssl rand -hex 32)" \
--from-literal=INTERNAL_SERVICE_TOKEN="$(openssl rand -hex 32)" \
--from-literal=METRICS_TOKEN="$(openssl rand -hex 24)" \
--from-literal=MONGODB_ROOT_PASSWORD="$(openssl rand -hex 24)" \
--from-literal=REDIS_PASSWORD="$(openssl rand -hex 24)" \
--from-literal=LICENSE_KEY='CHNGT2.…' \
--from-literal=SMTP_USER='…' \
--from-literal=SMTP_PASS='…'| Key | What it does |
|---|---|
LICENSE_KEY | From your licence email; it starts CHNGT2.. Its signature is checked offline against a key built into the platform, so no secret goes with it. An invalid or expired key refuses every agent run (LICENSE_INVALID). |
ENCRYPTION_KEY | Exactly 64 hex characters. Encrypts stored tool credentials; losing it makes them unreadable. |
AUDIT_CHAIN_KEY | Keys the tamper-evident audit trail. Keep it stable: changing it makes earlier entries fail verification. |
METRICS_TOKEN | Protects /metrics. Unset, the endpoint is closed. |
INTERNAL_SERVICE_TOKEN | Authenticates calls between the backend and the agent service. |
SMTP_USER, SMTP_PASS | Your mail relay, for sign-up verification and invitations. Host and port go in config.extra. |
Store copies of ENCRYPTION_KEY and AUDIT_CHAIN_KEY in your own secret manager before going further.
2. Set your values
Copy values-prod.yaml and set at least:
config:
FRONTEND_URL: https://changents.yourcompany.internal
extra:
SMTP_HOST: smtp.yourcompany.internal
SMTP_PORT: '587'
EMAIL_FROM: changents@yourcompany.com
ingress:
host: changents.yourcompany.internal
tls:
enabled: true
secretName: changents-tls # your certificatevalues-prod.yaml already sets the ingress timeouts (310 s, longer than the backend's 300 s run ceiling) and a 210 MB body limit for ingress-nginx. With another ingress controller, set the equivalent.
Settings that come with the chart and matter on-premises:
| Setting | Default | Notes |
|---|---|---|
config.OLLAMA_MODEL | gemma2:2b | The text model. See Models & GPU |
config.OLLAMA_EMBED_MODEL | nomic-embed-text | Embeddings for knowledge collections |
config.VISION_MODEL | gemma3:4b | Looks at images, video frames and camera snapshots given to a run |
config.OLLAMA_NUM_THREAD | 8 | CPU model hosts only. Test on your hardware |
config.SERVER_APPROVAL_GATES | true | Approval steps pause the run until a second admin approves |
airGapped | false | See below |
ollama.externalEndpoint | empty | Use a model server you already run, e.g. a GPU host on your network |
networkPolicy.extraEgress | [] | Destinations outside the cluster the platform must reach. See below |
config.extra.CAMERA_STREAM_ALLOWED_CIDRS | empty | Camera subnets live camera feeds may come from. See Cameras on your network |
serviceMonitor.enabled, prometheusRule.enabled | true in values-prod.yaml | Prometheus scraping (with METRICS_TOKEN) and the alert rules. See Monitoring |
Let the platform reach your own systems
The default network policy lets platform pods reach only each other, cluster DNS and (when not air-gapped) port 443. Anything else on your network is blocked until you allow it: your SMTP relay, a GPU model host outside the cluster, and the internal systems your agents call. Add standard egress rules, kept in air-gapped mode:
networkPolicy:
extraEgress:
- to: [{ ipBlock: { cidr: 10.20.0.25/32 } }] # mail relay
ports: [{ protocol: TCP, port: 587 }]
- to: [{ ipBlock: { cidr: 10.30.0.0/24 } }] # GPU model hosts
ports: [{ protocol: TCP, port: 11434 }]Cameras on your network
Live camera feeds are refused when the camera's address is private, unless you list the camera subnets:
config:
extra:
CAMERA_STREAM_ALLOWED_CIDRS: '10.40.0.0/16,192.168.20.0/24'
networkPolicy:
extraEgress:
- to: [{ ipBlock: { cidr: 10.40.0.0/16 } }]
ports: [{ protocol: TCP, port: 554 }, { protocol: TCP, port: 80 }]List only camera networks. The setting applies on licensed on-premises installs only. Loopback and link-local addresses (where cloud metadata services live) are refused even if you list them, and so are entries broader than a /8.
Keys in your HSM
To keep keys in a hardware security module, use the HSM image (built from backend/Dockerfile.hsm) as backend.image.repository, and set:
hsm:
enabled: true
modulePath: /opt/hsm/lib/libCryptoki2_64.so # your vendor's library, as mounted
tokenLabel: changents
pinSecret: changents-hsm-pin # a Secret with the key "pin"
libraryVolume:
hostPath: { path: /opt/safenet } # mounted at /opt/hsm
extraEnv:
- { name: ChrystokiConfigurationPath, value: /opt/hsm/etc }
platformKey: true # the platform key in the HSM tooWith platformKey: true, your Secret carries PLATFORM_KEY_WRAPPED instead of ENCRYPTION_KEY. See Customer-held keys.
Monitoring
With the Prometheus Operator installed, values-prod.yaml turns on a ServiceMonitor and the alert rules. The ServiceMonitor scrapes the backend with METRICS_TOKEN from the Secret. If your Prometheus selects rules and monitors by label, add it:
serviceMonitor:
labels: { release: kube-prometheus-stack }
prometheusRule:
labels: { release: kube-prometheus-stack }The rules cover: backend down, model server down, MongoDB or Redis down, pods restarting, a high 5xx rate, agent calls failing, slow agent calls (95th percentile over two minutes), containers near their memory limit, and volumes nearly full. They need kube-state-metrics. The model server's own health check answers even while generation is stuck, so the agent-call alerts are the ones to trust.
3. Install
helm install changents ./helm/changents-ai -n changents \
-f my-values.yaml \
--set secrets.existingSecret=changents-secretsOn first install a job pulls the text, embedding and vision models into the model server's volume (not in air-gapped mode).
Check it:
kubectl -n changents get pods
kubectl -n changents port-forward svc/changents-changents-ai-backend 8084
curl http://localhost:8084/health
curl http://localhost:8084/api/health/providersThen run the verification checklist.
Air-gapped installs
Add -f helm/changents-ai/values-airgapped.yaml. It:
- sets
AIR_GAPPED=true, which removes every cloud model provider at start-up and rejects any model endpoint outside private networks (loopback, RFC 1918, cluster-internal names); - pulls every image from
global.imageRegistry(your mirror). The mirror replaces each image's registry, and the repository path is kept, so mirrorvemaya-asia/changents-ai/backend,library/mongoand so on at those paths; - skips the model-pull job. Preload the model volume yourself.
Before installing, mirror these six images at the tags in values.yaml: vemaya-asia/changents-ai/backend, vemaya-asia/changents-ai/python-service, vemaya-asia/changents-ai/frontend, ollama/ollama, library/mongo, library/redis. The image archive and scripts/onprem/import-images.sh do this for you (see Images).
To preload the models, run ollama pull for each model on a connected machine, then copy its ~/.ollama/models directory onto the model server's volume.
What air-gapped mode does not do: it does not police what your own integrations send elsewhere, and email needs an internal relay. Leave cloud provider keys out of the Secret.
Run content, keys and node placement
| Value | Default | What it does |
|---|---|---|
privacy.retention | none | No-Retention Mode for every organisation that has not chosen; standard keeps run history |
privacy.enforced | false (true in values-airgapped.yaml) | Organisations cannot choose standard |
privacy.deliveryMinutes | 10 | How long a finished run's result stays readable |
customerKeys.refreshSeconds / maxStaleSeconds | 60 / 300 | How often Customer-Held Keys are checked, and how long a key that stops answering stays usable |
scheduling.nodeSelector / tolerations | empty | Place the backend and agent service on nodes you choose |
Put CUSTOMER_KEK in the Secret to offer customer-held keys with the local provider.
scheduling lets you keep the pods that handle content on a node pool you trust, for example your cloud's confidential VMs. The chart does not check or attest what those nodes are.
Upgrading a release that kept run history? It switches to no retention unless you set privacy.retention: standard.
Evaluation clusters
values-dev.yaml renders a Secret from throwaway values so the chart installs on kind, minikube or k3d without preparation. Do not use it anywhere real: the values are stored in Helm's release history.
Upgrades and rollback
helm upgrade changents ./helm/changents-ai -n changents -f my-values.yaml --set secrets.existingSecret=changents-secrets
helm rollback changents <previous revision> -n changentsUpgrade a staging install first. Back up MongoDB before upgrading production.
What was verified, and what was not
On 10 October 2026 the chart was installed on a live single-node Kubernetes 1.35 cluster from locally built release images, with values-prod.yaml and the overrides below, and then switched to air-gapped mode with helm upgrade. In both modes the verification checklist passed: all pods ready with no restarts, the licence accepted, the web app and these docs served, /api reaching this install's backend, metrics closed without the token, sign-up with the verification email delivered through an in-cluster mail relay (via extraEgress), sign-in, and an agent run on the private model under the licence. In air-gapped mode the backend could not reach the internet and only the private model was configured. The chart also lints with helm lint, and every render passes kubeconform -strict.
The live install found, and this chart version fixes: a web app that could not start as non-root, an agent service that never passed its probes, and an /api proxy that could not resolve the backend.
Not covered by that install: ingress and TLS, more than one backend replica, the Prometheus Operator objects, and load. Install on a staging cluster before production.
Things to get right on your cluster
- Uploads with more than one backend replica need
ReadWriteManystorage (NFS, CephFS, a cloud file share). Single-node and local-path storage areReadWriteOnce: run one backend replica, or setbackend.uploads.accessMode: ReadWriteOnce. - Keep
OLLAMA_NUM_THREADat or below the model server's CPU limit. On the test cluster a 4-CPU limit with 8 threads roughly doubled agent run times. clusterDomaindefaults tocluster.local. Change it if your cluster uses another DNS domain, or the web app cannot reach the backend.