Skip to content

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 name vitalrix-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/vitalrix chart 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. and docs. under your domain, pointing at your ingress.

Install

  1. 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'
  2. 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: Acme
  3. Install the chart

    Install
    helm install vitalrix ./helm/vitalrix -n vitalrix --create-namespace -f my-values.yaml

    The 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=vitalrix
  4. Sign in

    When the pods are ready, open https://monitor.<domain> and sign in as admin.email with the password from ADMIN_PASSWORD.

Distributed or all-in-one

The two modes
mode: distributed (default)mode: allInOne
What runsOne Deployment per component: the API gateway, each service, each worker and each web app.One pod that runs everything, like the Docker Compose container.
ScalingEach component scales on its own with its replicas value.One replica only. Upgrades replace the pod (Recreate).
ResourcesPer 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 forProduction.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_SECRET or ANTHROPIC_API_KEY there.
  • secrets: values in your values file, from which the chart creates the Secret. Keep that file out of version control.
Keys in the secrets Secret
KeyValue
JWT_ACCESS_SECRETRequired. openssl rand -hex 32
INTERNAL_SECRETRequired. openssl rand -hex 32
INTEGRATION_ENCRYPTION_KEYRequired. openssl rand -base64 32. It encrypts stored integration credentials: keep it with your backups.
REVALIDATE_SECRETOptional with secrets (defaults to INTERNAL_SECRET). Set it in an existingSecret.
PREVIEW_SECRETOptional with secrets (defaults to JWT_ACCESS_SECRET). Set it in an existingSecret.
METRICS_TOKENOptional with secrets (generated). Set it in an existingSecret.
ONCALL_LINK_SECRETOptional with secrets (defaults to INTERNAL_SECRET). Set it in an existingSecret.
SMTP_PASSWORDYour mail server password, if it needs one.
DATABASE_URLIn an existingSecret. With secrets, set database.url instead.
REDIS_URLIn an existingSecret. With secrets, set redis.url instead.
ADMIN_PASSWORDThe first administrator's password, when admin.email is set. With secrets, set admin.password instead.
Secrets in the values file 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 database and Redis
bundled:
  enabled: true
  postgresPassword: "<a password>"
  postgresSize: 50Gi
  redisSize: 5Gi

Ingress and TLS

  • The chart creates one Ingress with a host for each address: monitor., api. and docs. (when docs.enabled).
  • ingress.className is nginx by 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 with ingress.annotations.
  • ingress.tls.secretName names the Secret with the certificate for all hosts. Add a cert-manager annotation if cert-manager issues it.
  • Set ingress.enabled: false to 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

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 vitalrix

Scaling

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.

More replicas
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 storage

Storage

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/vitalrix when 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 set image.repository (and imagePullSecrets, image.tag) to it. nodeSelector and tolerations place 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.