Kubernetes (Helm) Production
Deploy Securo securely to a production Kubernetes cluster with external databases, secrets management, Ingress/TLS, and autoscaling.
When deploying Securo to a production Kubernetes cluster, we strongly recommend bypassing plain-text secrets in values.yaml in favor of external secret management, using managed or clustered databases, configuring automated TLS with Ingress or the Gateway API, and enabling autoscaling.
For a local testing or general overview of the Helm chart, see the Kubernetes (Helm) guide first.
1. Secrets Management (existingSecret)
In production, avoid placing sensitive credentials (like SECRET_KEY, database credentials, or API keys) directly in your values.yaml or Git repository. Instead, create a Kubernetes Secret out-of-band or manage it using tools like External Secrets Operator, Sealed Secrets, or HashiCorp Vault.
Create the Secret
Create a securo-secrets.yaml containing your production credentials:
apiVersion: v1
kind: Secret
metadata:
name: securo-secrets
namespace: default
type: Opaque
stringData:
SECRET_KEY: "your-strong-random-secret-key" # optional: left out, Securo generates one and keeps it in the database
DATABASE_URL: "postgresql+asyncpg://securo_user:strong_password@postgres-ha.database.svc.cluster.local:5432/securo"
# Optional integrations
PLUGGY_CLIENT_ID: "your-pluggy-client-id"
PLUGGY_CLIENT_SECRET: "your-pluggy-client-secret"
OPENEXCHANGERATES_APP_ID: "your-openexchangerates-app-id"
AGENTS_OPENAI_API_KEY: "your-openai-api-key"Apply it to your cluster:
kubectl apply -f securo-secrets.yamlPass the Secret to Helm
Tell the Helm release to consume your existing secret:
helm install securo oci://ghcr.io/securo-finance/charts/securo \
--version 0.14.0 \
--set global.existingSecret=securo-secrets \
--set global.domain=securo.yourdomain.com2. External Databases (PostgreSQL & Redis)
By default, the chart deploys bundled single-instance StatefulSets for PostgreSQL and Redis. For production high availability and backup management, disable the internal databases and connect Securo to managed cloud services (e.g. AWS RDS / ElastiCache, GCP Cloud SQL / Memorystore) or HA in-cluster operators.
helm install securo oci://ghcr.io/securo-finance/charts/securo \
--version 0.14.0 \
--set postgresql.enabled=false \
--set redis.enabled=false \
--set config.redisUrl="redis://redis-ha.database.svc.cluster.local:6379/0" \
--set config.celeryBrokerUrl="redis://redis-ha.database.svc.cluster.local:6379/0" \
--set config.celeryResultBackend="redis://redis-ha.database.svc.cluster.local:6379/0" \
--set global.existingSecret=securo-secrets \
--set global.domain=securo.yourdomain.com(Ensure DATABASE_URL is defined inside your securo-secrets secret).
PostgreSQL pgvector Requirement
Securo relies on the pgvector extension for vector embeddings, financial agents, and semantic document search. Your external PostgreSQL database must have the pgvector extension installed. Run the following in your database before starting Securo:
CREATE EXTENSION IF NOT EXISTS vector;Redis Architecture Note
Securo connects to a single Redis endpoint for caching, rate limiting, and Celery task brokering. Standalone Redis instances or setups exposed through a single endpoint/proxy (such as AWS ElastiCache with Cluster Mode disabled) are supported. Redis Sentinel and Redis Cluster (multi-shard mode) are not supported.
Client Certificates, Private CAs and Extra Settings
backend, celeryWorker, celeryBeat and migration each take extraEnv, extraEnvFrom, extraVolumes and extraVolumeMounts, empty by default and written in the usual Kubernetes shapes. extraEnv is read after the chart's ConfigMap and Secret, so it wins over both. Give the migration Job the same extras as the pods: it reaches the database first.
For example, a PostgreSQL that authenticates with a TLS client certificate:
# values-production.yaml
backend:
extraEnv:
- name: PGSSLMODE
value: verify-full
- name: PGSSLCERT
value: /etc/pg-tls/tls.crt
- name: PGSSLKEY
value: /etc/pg-tls/tls.key
- name: PGSSLROOTCERT
value: /etc/pg-tls/ca.crt
extraVolumes:
- name: pg-client-tls
secret:
secretName: pg-client-tls
extraVolumeMounts:
- name: pg-client-tls
mountPath: /etc/pg-tls
readOnly: trueRepeat the block under celeryWorker, celeryBeat and migration, since they connect to the same database.
To mount a PersistentVolumeClaim you already have for attachments, set persistence.attachments.existingClaim to its name and keep persistence.attachments.enabled: true; the chart then creates no claim of its own and leaves yours alone on uninstall.
On a release that is already running, don't switch to existingClaim in a single upgrade: the chart's own claim leaves the release, Helm deletes it, and with a Delete reclaim policy your attachments go with it. Do it in two steps: annotate the chart's PVC with helm.sh/resource-policy: keep and upgrade, then set existingClaim and upgrade again. A claim you created yourself, outside the release, needs no handoff.
3. High Availability and Storage
Shared Storage (ReadWriteMany / RWX)
By default, the Helm chart enables a PersistentVolumeClaim for file attachments (persistence.attachments.enabled=true) using ReadWriteOnce (RWO) storage.
Attachment files (as well as agent knowledge files and embedding models if the AI agents feature is enabled) are shared concurrently across the Backend, Celery Worker, and MCP Server pods.
If your pods are scheduled across multiple worker nodes, you must configure a storage class that supports ReadWriteMany (RWX) access mode (such as NFS, CephFS, AWS EFS, or GCP Filestore):
# values-production.yaml
persistence:
attachments:
enabled: true
storageClass: "nfs-client" # e.g. efs-sc, cephfs, or your RWX storage class
accessMode: ReadWriteMany
size: 10Gi
agentKnowledge:
enabled: true
storageClass: "nfs-client"
accessMode: ReadWriteMany
size: 10GiReadWriteOnce (RWO) storage only works if all pods mounting the volume are scheduled onto the same single node.
Managed Backups
The in-app managed backups need a volume of their own, and it is off by default. Turn it on with persistence.backups.enabled: true (5Gi, ReadWriteOnce unless you change accessMode and storageClass); the Backend, Celery Worker and Celery Beat pods then mount it at /app/data/backups, under the same RWX rule as above. Without it, backups run on the server live on pod-local storage and are lost when the pod is replaced, and scheduled backups are turned off because the API and the worker don't share a filesystem. Downloading a backup straight from the page works either way.
S3-Compatible Object Storage
Instead of an RWX volume for attachments, Securo can keep them in an S3-compatible bucket (AWS S3, MinIO, Garage and others). Create a private bucket, then:
# values-production.yaml
config:
storageProvider: "s3"
storageS3Bucket: "securo-attachments"
storageS3Region: "us-east-1"
storageS3EndpointUrl: "" # empty for AWS S3; your endpoint for MinIO or Garage
storageS3AddressingStyle: "auto" # use path for Garage/MinIO
persistence:
attachments:
enabled: falsePut STORAGE_S3_ACCESS_KEY and STORAGE_S3_SECRET_KEY in your existingSecret (or secret.storageS3AccessKey and secret.storageS3SecretKey). Leave both out to use the SDK's credential chain, such as an IAM role for the service account. Invoice attachments and logos go to the bucket too; agent knowledge files and embedding models still need their volumes when agents are on.
Copy the files already in the attachments volume to the bucket before you disable that PVC, using each file's path inside the volume as its object key.
Singleton Celery Beat Scheduler
While Backend and Celery Worker pods scale horizontally, Celery Beat must run as a strict singleton (exactly 1 replica) to prevent duplicate background scheduling (such as duplicate bank sync jobs). The Helm chart automatically enforces this constraint.
4. Working Ingress + cert-manager Example
Securo routes all API traffic through the frontend container internally, so your Ingress controller only needs to expose the root path (/) to the frontend service.
Step 1: Set up cert-manager ClusterIssuer
If you use cert-manager, create a production Let's Encrypt ClusterIssuer:
# cluster-issuer.yaml
apiVersion: cert-manager.io/v1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email: admin@yourdomain.com
privateKeySecretRef:
name: letsencrypt-prod-account-key
solvers:
- http01:
ingress:
class: nginxkubectl apply -f cluster-issuer.yamlStep 2: Deploy Securo with Ingress & TLS
helm install securo oci://ghcr.io/securo-finance/charts/securo \
--version 0.14.0 \
--set global.domain=securo.yourdomain.com \
--set global.tls=true \
--set ingress.enabled=true \
--set ingress.className=nginx \
--set ingress.annotations."cert-manager\.io/cluster-issuer"=letsencrypt-prod \
--set ingress.tls[0].secretName=securo-tls-cert \
--set "ingress.tls[0].hosts[0]=securo.yourdomain.com" \
--set global.existingSecret=securo-secrets5. Gateway API Alternative (HTTPRoute)
If your cluster uses the modern Kubernetes Gateway API (e.g., with Cilium, Envoy Gateway, or Istio), you can configure an HTTPRoute instead of an Ingress.
Step 1: Configure Gateway Resource with TLS
Create a Gateway configured with cert-manager for automated certificate issuance:
# gateway.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: external-gateway
namespace: default
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
gatewayClassName: cilium # or your gateway class
listeners:
- name: https
protocol: HTTPS
port: 443
hostname: "securo.yourdomain.com"
tls:
mode: Terminate
certificateRefs:
- name: securo-gateway-tlskubectl apply -f gateway.yamlStep 2: Deploy Securo with HTTPRoute
helm install securo oci://ghcr.io/securo-finance/charts/securo \
--version 0.14.0 \
--set global.domain=securo.yourdomain.com \
--set global.tls=true \
--set ingress.enabled=false \
--set httpRoute.enabled=true \
--set "httpRoute.parentRefs[0].name=external-gateway" \
--set "httpRoute.parentRefs[0].namespace=default" \
--set global.existingSecret=securo-secrets6. Horizontal Pod Autoscaling (HPA)
To handle production traffic spikes dynamically, enable Horizontal Pod Autoscaling. The Helm chart provisions HorizontalPodAutoscaler resources for all scalable components (Frontend, Backend, Celery Worker, and MCP Server), while keeping the Celery Beat scheduler as a single instance.
HPA requires a metrics-server installed in your cluster (e.g. via kube-prometheus-stack or standalone metrics-server).
Enable HPA in values-production.yaml
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPUUtilizationPercentage: 80
targetMemoryUtilizationPercentage: 80Deploy with autoscaling enabled:
helm install securo oci://ghcr.io/securo-finance/charts/securo \
--version 0.14.0 \
-f values-production.yaml7. Automated Database Migrations
The Helm chart includes a pre-configured database migration Job annotated with post-install and post-upgrade hooks:
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-weight": "5"
"helm.sh/hook-delete-policy": hook-succeededBecause this job is configured as a post-install and post-upgrade hook, it runs alembic upgrade head with built-in retry logic after the new pods roll out during installation and upgrades.
8. Upgrading in Production
To upgrade an existing production deployment to a new release:
# 1. Always back up your external database first
pg_dump -U securo_user -h postgres-ha -d securo > securo-pre-upgrade-$(date +%Y%m%d).sql
# 2. Upgrade the Helm release
helm upgrade securo oci://ghcr.io/securo-finance/charts/securo \
--version <NEW_VERSION> \
-f values-production.yaml