Brume · Docs
Installation

Helm chart (Kubernetes)

Install Brume on an existing Kubernetes cluster: operators, secrets, values file, Helm release, verification.

In brief

Install Brume on the Kubernetes cluster you already operate: two operators, a few secrets, one values file, one Helm release. The public chart remains the source of truth; adapt identifiers, domains, and secrets to your environment.

Chart under the Enterprise license

The ee/helm-chart/ chart is Enterprise code: source-available, free for evaluation and development, under a commercial license in production. The images it deploys are the regular product images; the active edition is decided at runtime by BRUME_EDITION and the installed license, covered in Enterprise Edition.

This page applies to any Kubernetes distribution. It starts from a working cluster and stops at the first health check. For a single host, take Docker all-in-one; for a self-host behind your domain, Docker Compose. To build the cluster itself on a small budget, follow Low-cost HA.

What the cluster must provide

ItemExpected
Kubernetes clusterWorking, three control-plane members for high availability
Ingress controllerTraefik or equivalent, with your upstream routing and TLS
storageClassA storage class available for the PostgreSQL volumes
Operator workstationkubectl and helm authenticated against the cluster
Secret managerAll secrets (PostgreSQL passwords, GHCR token, S3 keys) live there, never in the repo

Resources per component

The chart reserves requests (guaranteed at startup) and caps limits (never exceeded). These values size the CPU and memory need of the nodes carrying the load.

ComponentRequests (memory / CPU)Limits (memory / CPU)Replicas
Frontend256 Mi / 100m1 Gi / 1000m2
Backend512 Mi / 250m2 Gi / 2000m2
Worker (Docling extraction, OCR)1 Gi / 500m4 Gi / 2000m1
Real-time relay (tower)256 Mi / 100m512 Mi / 500m2

The worker has the highest memory limit (4 Gi): Docling document extraction and OCR are demanding. The frontend, backend, and relay run in two replicas distributed by anti-affinity, so no node carries both copies of the same service.

PostgreSQL

The database is the only stateful component. It runs as two CloudNativePG instances (primary plus replica), on one volume per instance.

ParameterValue
storage50 Gi per instance
shared_buffers2 to 4 GB depending on node RAM
effective_cache_size6 to 12 GB depending on node RAM
max_connections200
wal_levelreplica

wal_level: replica is required for continuous replication to the second instance and WAL archival for backups. The image embeds pgvector for vector search.

Installation

Install the Kubernetes operators

Two operators, installed with Helm:

ComponentRole
CloudNativePG (CNPG)high-availability PostgreSQL operator (failover, backups, PITR)
kube-prometheus-stackmonitoring (Prometheus, Grafana, Alertmanager, node-exporter)
helm repo add cnpg https://cloudnative-pg.github.io/charts
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update

helm install cnpg cnpg/cloudnative-pg \
  --namespace cnpg-system --create-namespace

helm install monitoring prometheus-community/kube-prometheus-stack \
  --namespace monitoring --create-namespace

Verify:

kubectl get pods -n cnpg-system   # cnpg-controller-manager Running
kubectl get pods -n monitoring    # prometheus, grafana, alertmanager, node-exporter Running

Create the Kubernetes secrets

Secrets live in <namespace> and are created outside the chart, from the values in your secret manager.

Below, <instance> is global.instanceName or, if empty, the Helm release name; <namespace> is the configured namespace (chart default: misty).

kubectl create namespace <namespace>

Access to the GHCR image registry, example with 1Password and its op CLI:

GHCR_TOKEN=$(op read "op://<your-vault>/GHCR/token")
kubectl create secret docker-registry ghcr-pull-secret \
  --namespace <namespace> \
  --docker-server=ghcr.io \
  --docker-username=brume-ai \
  --docker-password=$GHCR_TOKEN

PostgreSQL credentials, example with 1Password and its op CLI. The CNPG bootstrap owner (<instance>) and the runtime role (brume_app) have distinct passwords:

PG_OWNER_PASS=$(op read "op://<your-vault>/Cluster <instance>/pg-owner-password")
PG_RUNTIME_PASS=$(op read "op://<your-vault>/Cluster <instance>/pg-runtime-password")
PG_RUNTIME_PASS_URLENCODED=$(PG_RUNTIME_PASS="$PG_RUNTIME_PASS" python3 -c \
  'import os; from urllib.parse import quote; print(quote(os.environ["PG_RUNTIME_PASS"], safe=""))')

kubectl create secret generic <instance>-pg-app \
  --namespace <namespace> \
  --type=kubernetes.io/basic-auth \
  --from-literal=username=<instance> \
  --from-literal=password="$PG_OWNER_PASS"

By default, leave pg.secrets.superuser empty: with enableSuperuserAccess, CloudNativePG generates <instance>-pg-superuser. If you override that name, create a kubernetes.io/basic-auth secret yourself with username and password (1Password op example):

PG_SU_PASS=$(op read "op://<your-vault>/Cluster <instance>/pg-superuser-password")

kubectl create secret generic <instance>-pg-superuser-custom \
  --namespace <namespace> \
  --type=kubernetes.io/basic-auth \
  --from-literal=username=postgres \
  --from-literal=password="$PG_SU_PASS"

The init containers build the admin URL to brume from that secret and encode the username and password; they do not use the CNPG uri key, which targets /* rather than a specific database.

Backend: DATABASE_URL uses only brume_app on the CNPG read-write service <instance>-pg-rw. Never place DATABASE_ADMIN_URL in this secret, which is shared by the main containers:

kubectl create secret generic <instance>-backend-env \
  --namespace <namespace> \
  --from-literal=DATABASE_URL="postgresql://brume_app:${PG_RUNTIME_PASS_URLENCODED}@<instance>-pg-rw:5432/brume" \
  --from-literal=JWT_SECRET="$(openssl rand -hex 32)" \
  --from-literal=APP_ENCRYPTION_KEY="$(python3 -c 'from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())')"

JWT_SECRET signs sessions and APP_ENCRYPTION_KEY encrypts the LLM keys in the database: without them, the backend starts with known default values. Save both to your secret manager and keep the same values on every redeployment — the details are in Configuration variables.

PostgreSQL backups: the chart references an S3 secret cnpg-barman-s3 (name set by pg.backup.s3SecretName) with the fields ACCESS_KEY_ID and ACCESS_SECRET_KEY:

kubectl create secret generic cnpg-barman-s3 \
  --namespace <namespace> \
  --from-literal=ACCESS_KEY_ID="$(op read "op://<your-vault>/S3 CNPG/access-key-id")" \
  --from-literal=ACCESS_SECRET_KEY="$(op read "op://<your-vault>/S3 CNPG/secret-access-key")"

Tower, example with 1Password and its op CLI: the encryption key is saved to your secret manager.

TOWER_KEY=$(openssl rand -hex 32)
kubectl create secret generic <instance>-tower-env \
  --namespace <namespace> \
  --from-literal=DATABASE_URL="postgresql://brume_app:${PG_RUNTIME_PASS_URLENCODED}@<instance>-pg-rw:5432/brume" \
  --from-literal=TOWER_ENCRYPTION_KEY="$TOWER_KEY"

op item edit "Cluster <instance>" --vault "<your-vault>" "tower-encryption-key=$TOWER_KEY"

Verify:

kubectl get secrets -n <namespace>
# expected once CNPG has started: ghcr-pull-secret, <instance>-pg-app,
#           <instance>-pg-superuser (generated by CNPG), cnpg-barman-s3,
#           <instance>-backend-env, <instance>-tower-env

Model keys: in the database, encrypted per workspace

Language model API keys live in the database, encrypted per workspace and per tenant (BYOK). An instance onboards by entering the key in the settings, without touching the cluster: no kubectl create secret for an LLM key.

Write the values file and deploy

An instance's configuration fits in values/<instance>.yaml, a skeleton anchored on the brume-chart chart:

global:
  clusterName: <instance>
  namespace: <namespace>
  domain: agents.<your-domain>
  apiDomain: api.<your-domain>
  towerDomain: tower.<your-domain>
  docsDomain: docs.<your-domain>
  imagePullSecret: ghcr-pull-secret

frontend:
  replicas: 2
  image: ghcr.io/brume-ai/brume-studio-frontend:latest
  resources:
    requests: { memory: "256Mi", cpu: "100m" }
    limits:   { memory: "1Gi",   cpu: "1000m" }

docs:
  enabled: true
  image: ghcr.io/brume-ai/brume-studio-docs:latest

backend:
  replicas: 2
  image: ghcr.io/brume-ai/brume-studio-backend:latest
  env:
    secretName: <instance>-backend-env
  resources:
    requests: { memory: "512Mi", cpu: "250m" }
    limits:   { memory: "2Gi",   cpu: "2000m" }

worker:
  enabled: true
  replicas: 1
  image: ghcr.io/brume-ai/brume-studio-worker:latest
  resources:
    requests: { memory: "1Gi", cpu: "500m" }
    limits:   { memory: "4Gi", cpu: "2000m" }

pg:
  instances: 2
  imageName: ghcr.io/brume-ai/brume-studio-postgres:18.3-pgvector
  database: brume
  owner: <instance>
  storage: 50Gi
  storageClass: local-path       # your cluster's storage class
  extensions:
    - vector
    - pgaudit                    # shipped by default in the chart
  parameters:
    shared_buffers: "2GB"        # adjust to the node's RAM
    effective_cache_size: "6GB"  # adjust to the node's RAM
    max_connections: "200"
    wal_level: "replica"
    pgaudit.log: "ddl,role"
    pgaudit.role: "brume_pgaudit"
  secrets:
    app: <instance>-pg-app
    # Empty: CNPG generates <instance>-pg-superuser.
    superuser: ""
  backup:
    enabled: true
    s3Path: s3://<your-bucket>/cnpg/<instance>-pg
    s3SecretName: cnpg-barman-s3
    retentionPolicy: "30d"
    schedule: "0 0 */4 * * *"    # 6-field CNPG, every 4 h

monitoring:
  enabled: true
  grafanaDomain: grafana.<your-domain>
  alertsNtfyTopic: <instance>-alerts

tower:
  enabled: true
  replicas: 1

ingress:
  excludeHosts: []

Upgrading from a deployment where misty was the runtime

Keep pg.owner: misty and the misty-pg-app secret, the bootstrap owner. Before helm upgrade, replace only DATABASE_URL in misty-backend-env with the brume_app URL above, using a new password: the init container receives the superuser URL separately, creates or reconciles brume_app, then migrates before the backend starts.

If pg.secrets.superuser already points to a custom secret, check the kubernetes.io/basic-auth type and the username/password keys — the init containers encode them and explicitly target pg.database. You may also drop the override and let CNPG manage misty-pg-superuser.

Deploy:

helm install <instance> ee/helm-chart/ \
  -f ee/helm-chart/values/<instance>.yaml \
  --namespace <namespace>

Anti-affinity and rollout strategy

Deployments with 2+ replicas (frontend, backend, tower) carry a required per-host anti-affinity, plus maxUnavailable: 1 and maxSurge: 0 — a mandatory combination: with required anti-affinity and a non-zero maxSurge, the rolling update creates a surplus pod with no free node to land on (deadlock).

Verify the deployment

kubectl get pods -n <namespace>
# expected: frontend (2), backend (2), worker (1), <instance>-pg (2), tower (1), all Running

kubectl get cluster -n <namespace>
# expected: <instance>-pg, instances 2, Cluster in healthy state

curl -s https://api.<your-domain>/health
curl -s https://agents.<your-domain>

End-of-deployment checklist

  • All pods Running (kubectl get pods -n <namespace>)
  • PostgreSQL healthy, 2 instances (kubectl get cluster -n <namespace>)
  • Frontend accessible (curl https://agents.<your-domain>)
  • API health check OK (curl https://api.<your-domain>/health)
  • PostgreSQL backup configured and first backup successful (kubectl get backups -n <namespace>)
  • values/<instance>.yaml file committed in ee/helm-chart/values/

Next

The architecture details what each component does in the cluster. PITR backup and restore, upgrades, monitoring, and troubleshooting: dedicated pages of this section.

On this page