Install on Kubernetes with Helm
Install VitalRix in your own cluster with the Helm chart: values, secrets, database and Redis, ingress and TLS, the first administrator, upgrades and scaling.
Before you start
- Kubernetes 1.27 or later, Helm 3 and kubectl access to the cluster.
- An ingress controller. The chart is written for ingress-nginx and sets its upload size and timeout annotations.
- A TLS certificate for
*.<domain>in a Secret (default namevitalrix-tls), or cert-manager to issue it. - PostgreSQL 16 or later and Redis 7 or later, ideally managed and backed up. Redis must use maxmemory-policy noeviction.
- The
helm/vitalrixchart from the installation bundle, your license file, and access to the image registry (or the images loaded into your own registry). - DNS for
monitor.,api.anddocs.under your domain, pointing at your ingress.
Install
Create the Secrets
Put the license and the secrets in Kubernetes Secrets. Generate a fresh value for each one, and never reuse them between installations.
Secrets kubectl create namespace vitalrix kubectl -n vitalrix create secret generic vitalrix-license \ --from-file=vitalrix.license=./vitalrix.license kubectl -n vitalrix create secret generic vitalrix-secrets \ --from-literal=JWT_ACCESS_SECRET="$(openssl rand -hex 32)" \ --from-literal=INTERNAL_SECRET="$(openssl rand -hex 32)" \ --from-literal=INTEGRATION_ENCRYPTION_KEY="$(openssl rand -base64 32)" \ --from-literal=REVALIDATE_SECRET="$(openssl rand -hex 32)" \ --from-literal=PREVIEW_SECRET="$(openssl rand -hex 32)" \ --from-literal=METRICS_TOKEN="$(openssl rand -hex 24)" \ --from-literal=ONCALL_LINK_SECRET="$(openssl rand -hex 32)" \ --from-literal=SMTP_PASSWORD='your-smtp-password' \ --from-literal=DATABASE_URL='postgres://vitalrix:password@db.acme.internal:5432/vitalrix' \ --from-literal=REDIS_URL='redis://redis.acme.internal:6379/0' \ --from-literal=ADMIN_PASSWORD='a-long-password-here'Write your values
Start from this example and change the domain, ingress and email settings. Every key is described in
helm/vitalrix/values.yaml.my-values.yaml # my-values.yaml domain: vitalrix.acme.internal mode: distributed # or allInOne for one pod license: existingSecret: vitalrix-license # a Secret with the key "vitalrix.license" existingSecret: vitalrix-secrets # the keys listed under "Secrets" below ingress: enabled: true className: nginx annotations: cert-manager.io/cluster-issuer: my-issuer # optional, if cert-manager issues the certificate tls: enabled: true secretName: vitalrix-tls # a certificate for *.vitalrix.acme.internal persistence: size: 50Gi storageClass: "" # your cluster's default when empty accessMode: ReadWriteMany # see "Scaling" below env: SMTP_HOST: smtp.acme.internal SMTP_PORT: "587" SMTP_USER: vitalrix SMTP_FROM: "VitalRix <vitalrix@acme.internal>" ALLOW_REGISTRATION: "false" LOG_LEVEL: info website: enabled: false docs: enabled: true admin: email: you@acme.com organization: AcmeInstall the chart
Install helm install vitalrix ./helm/vitalrix -n vitalrix --create-namespace -f my-values.yamlThe first start runs the database migrations: give it a few minutes. Watch the pods with:
Pods kubectl -n vitalrix get pods -l app.kubernetes.io/instance=vitalrixSign in
When the pods are ready, openhttps://monitor.<domain>and sign in asadmin.emailwith the password fromADMIN_PASSWORD.
Distributed or all-in-one
| mode: distributed (default) | mode: allInOne | |
|---|---|---|
| What runs | One Deployment per component: the API gateway, each service, each worker and each web app. | One pod that runs everything, like the Docker Compose container. |
| Scaling | Each component scales on its own with its replicas value. | One replica only. Upgrades replace the pod (Recreate). |
| Resources | Per component: 100m CPU and 256 Mi requested (384 Mi for the web apps) by default. | 2 CPU and 8 Gi requested, 14 Gi memory limit by default. |
| Use it for | Production. | Small installations and evaluation. |
Change resources under distributed.resources, distributed.appResources or allInOne.resources.
Secrets
Give the chart its secrets in one of two ways:
- existingSecret (recommended): the name of a Secret you create, as in the example above. The chart does not create one. Every key in it is passed to VitalRix as an environment variable, so you can also add
GOOGLE_CLIENT_SECRETorANTHROPIC_API_KEYthere. - secrets: values in your values file, from which the chart creates the Secret. Keep that file out of version control.
| Key | Value |
|---|---|
JWT_ACCESS_SECRET | Required. openssl rand -hex 32 |
INTERNAL_SECRET | Required. openssl rand -hex 32 |
INTEGRATION_ENCRYPTION_KEY | Required. openssl rand -base64 32. It encrypts stored integration credentials: keep it with your backups. |
REVALIDATE_SECRET | Optional with secrets (defaults to INTERNAL_SECRET). Set it in an existingSecret. |
PREVIEW_SECRET | Optional with secrets (defaults to JWT_ACCESS_SECRET). Set it in an existingSecret. |
METRICS_TOKEN | Optional with secrets (generated). Set it in an existingSecret. |
ONCALL_LINK_SECRET | Optional with secrets (defaults to INTERNAL_SECRET). Set it in an existingSecret. |
SMTP_PASSWORD | Your mail server password, if it needs one. |
DATABASE_URL | In an existingSecret. With secrets, set database.url instead. |
REDIS_URL | In an existingSecret. With secrets, set redis.url instead. |
ADMIN_PASSWORD | The first administrator's password, when admin.email is set. With secrets, set admin.password instead. |
# instead of existingSecret: the chart creates the Secret from these values
secrets:
JWT_ACCESS_SECRET: "<openssl rand -hex 32>"
INTERNAL_SECRET: "<openssl rand -hex 32>"
INTEGRATION_ENCRYPTION_KEY: "<openssl rand -base64 32>"
database:
url: postgres://vitalrix:password@db.acme.internal:5432/vitalrix
redis:
url: redis://redis.acme.internal:6379/0
license:
value: "<the license text>"
admin:
email: you@acme.com
password: "a-long-password-here"The license works the same way: license.existingSecret names a Secret with the key vitalrix.license, or license.value holds the license text. Without either, every product runs on Free limits until you install a license in the app. See your license.
Database and Redis
Point VitalRix at your own PostgreSQL 16+ and Redis 7+ with database.url and redis.url (or DATABASE_URL and REDIS_URL in your existingSecret). Configure Redis with maxmemory-policy noeviction: VitalRix keeps its queues there and they must never be evicted.
For a quick evaluation, the chart can run a single PostgreSQL and a single Redis for you:
bundled:
enabled: true
postgresPassword: "<a password>"
postgresSize: 50Gi
redisSize: 5GiIngress and TLS
- The chart creates one Ingress with a host for each address:
monitor.,api.anddocs.(whendocs.enabled). ingress.classNameisnginxby default. The chart adds ingress-nginx annotations for uploads up to 60 MB and streamed responses up to an hour; with another controller, set the equivalent withingress.annotations.ingress.tls.secretNamenames the Secret with the certificate for all hosts. Add a cert-manager annotation if cert-manager issues it.- Set
ingress.enabled: falseto route traffic to the services yourself.
The first administrator
When admin.email is set, a job runs once after the first install and creates the administrator and the organization (admin.organization, default "My organization"). The password comes from the ADMIN_PASSWORD key of the secrets Secret. The job runs only on helm install, not on upgrades, and creating an administrator works only on an empty installation.
Upgrade and roll back
# a new release: use the chart from the new bundle
helm upgrade vitalrix ./helm/vitalrix -n vitalrix -f my-values.yaml
# a settings change only
helm upgrade vitalrix ./helm/vitalrix -n vitalrix -f my-values.yaml --reuse-values
# go back to the previous revision
helm history vitalrix -n vitalrix
helm rollback vitalrix <revision> -n vitalrixScaling
In distributed mode, each component has a replicas value under distributed.components. By default the API gateway, log-service, metric-service, trace-service, monitor-worker and the monitor app run 2 replicas, and the rest 1.
distributed:
components:
api-gateway: { port: 4000, replicas: 3 }
log-service: { port: 4126, replicas: 4 }
metric-service: { port: 4127, replicas: 1, data: true } # 1 replica works with ReadWriteOnce storageStorage
Media uploads and session replays live on one persistent volume (persistence.size, default 50 Gi, kept when you uninstall). Only the components marked data: true, media-service and metric-service, attach it. With the default persistence.accessMode: ReadWriteOnce, the chart schedules those pods onto the same node, because such a volume attaches to one node at a time. To spread them across nodes, or to run more than one replica of either on different nodes, use ReadWriteMany and a storage class that supports it.
Everything else
- Turn the documentation off with
docs.enabled: false. - Plain settings, such as SMTP and sign-in options, go under
env. They are the same as the Docker Compose settings. - The image comes from
downloads.vitalrix.com/vitalrixwhen the cluster can reach the internet. Without internet access, copy the offline bundle's images to your registry with./vitalrix push-images registry.acme.internal(see air-gapped installations) and setimage.repository(andimagePullSecrets,image.tag) to it.nodeSelectorandtolerationsplace the pods. - Pods run as a non-root user (UID 1000).
Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.