Deploy with Kubernetes (Helm)¶
MATVIS ships with a Helm chart for Kubernetes deployments. Helm manages all Kubernetes resources (Deployments, Services, Secrets, PersistentVolumeClaims, etc.) and makes upgrades and rollbacks straightforward. This is the recommended path for production environments that need scalability or high availability.
Prerequisites¶
- A running Kubernetes cluster (tested on v1.34.4 / K3s)
- Helm (tested on v4.1.1)
- Network access to the MATVIS registry
- A valid service-account JSON key (
matvis-registry.key) for pulling the chart and images, and the registry path MATVIS delivers with it - Online license (default): a valid MATVIS license key, activation token, and account ID
- Air-gapped: a valid MATVIS license file (
license.lic)
The hardware the cluster node(s) need is listed in Requirements.
1. Create the namespace and image pull secret¶
kubectl create namespace matvis
kubectl create secret docker-registry registry-secret \
--docker-server=europe-west3-docker.pkg.dev \
--docker-username=_json_key \
--docker-password="$(cat matvis-registry.key)" \
-n matvis
2. Authenticate Helm with the registry¶
cat matvis-registry.key | helm registry login europe-west3-docker.pkg.dev \
--username=_json_key --password-stdin
3. Pull the chart¶
Replace <REGISTRY> with the registry path MATVIS delivers with your matvis-registry.key.
helm pull oci://<REGISTRY>/matvis-helm-repository/matvis \
--version <CHART_VERSION> --untar
cd matvis
The untarred matvis/ chart directory ships values.yaml and values.secrets.yaml. Edit them in
place.
values.yaml and values.secrets.yaml must both be passed on every helm install /
helm upgrade. Helm does not remember them between runs.
4. Configure¶
Configuration is split across two files:
values.yaml: everything except secrets (images, resource limits, NodePorts, GPU, license mode). Ships with working defaults.values.secrets.yaml: all secrets and credentials. Every field ships empty ("") and must be filled in before installing. Generate each secret withopenssl rand -base64 24, exceptuserApi.pseudonymSecret, which needs at least 32 bytes:openssl rand -base64 32.
Use a secrets manager in production
Keep values.secrets.yaml out of version control and off shared disks. In production, hold the
secrets in a secrets manager (for example HashiCorp Vault or your cloud provider's) and let it
create the Kubernetes Secrets, for instance with the External Secrets Operator. Then name each
Secret in the service's existingSecret value and leave the matching entries out of
values.secrets.yaml.
Topic fine-tuning is set per firewall configuration in the dashboard, see Firewall configuration.
# License, provided by MATVIS (online mode only; for air-gapped, see below)
keygen:
accountId: ""
activationToken: ""
licenseKey: ""
# PostgreSQL (the bundled database; for your own server see Deployment > Managed PostgreSQL)
postgres:
dbPassword: "" # generate: openssl rand -base64 24
# Keycloak & admin dashboard user
keycloak:
adminPassword: "" # generate: openssl rand -base64 24
dbPassword: "" # generate: openssl rand -base64 24
userEmail: "" # admin dashboard login email
userPassword: "" # generate: openssl rand -base64 24
userFirstname: ""
userLastname: ""
clientSecretDataApi: "" # generate: openssl rand -base64 24
clientSecretFrontend: "" # generate: openssl rand -base64 24
clientSecretUserApi: "" # generate: openssl rand -base64 24
# Frontend
frontend:
jwtSecret: "" # generate: openssl rand -base64 24
# Firewall API: the key PII tokens are derived from (required)
userApi:
pseudonymSecret: "" # generate: openssl rand -base64 32
# Column encryption at rest (beta, off by default)
crypto:
enabled: false
keyProvider: "env"
masterKey: "" # 256-bit key, base64; required when enabled
Services & ports¶
By default every service is exposed as NodePort. The ports that need to be reachable from
outside the cluster, and their defaults, are listed in
Requirements. Change them under services.nodePorts in
values.yaml, and set services.type: ClusterIP or close the other ports in your firewall.
TLS¶
The chart does not terminate TLS: the services speak plain HTTP. Terminate TLS in front of the
frontend and the Firewall API, with an Ingress controller or a load balancer, and set
HTTPS_ENABLED=true as described in the Configuration reference.
GPU acceleration¶
If your cluster has NVIDIA GPU nodes (16 GB VRAM recommended), you can offload inference to the
GPU. Each inference service has its own gpu: block in values.yaml, userApi,
filterApiTopic, filterApiPII, filterApiPromptInjection, filterApiIndirectPromptInjection
and filterApiTranslation. Enable GPU per service. The language filter runs on CPU only.
The GPU node must have, before deployment:
- NVIDIA GPU drivers: nvidia.com/drivers
- NVIDIA Container Toolkit: install guide
- NVIDIA Device Plugin for Kubernetes: exposes GPUs as
nvidia.com/gpu:
To run several accelerated services on one card, share it with NVIDIA MPS. By default the plugin
advertises one nvidia.com/gpu per physical card and each inference service claims one, so
without sharing one inference pod runs and the others stay Pending. Configure the plugin for
MPS sharing with replicas
set to at least the number of accelerated services.
Then set gpu.enabled: true for each service you want accelerated:
userApi:
gpu:
enabled: true # schedule this service on a GPU node
nodeSelector: {} # e.g. { cloud.google.com/gke-accelerator: nvidia-tesla-t4 }
affinity: {} # (optional) node affinity rules
tolerations: [] # (optional) tolerations for tainted GPU nodes
On a running deployment, helm upgrade with the new values rolls the affected pods; a manual
restart (see Operations) is not needed.
Logging & telemetry¶
Optional and disabled by default, both set in values.yaml:
syslog:
enabled: false
address: "" # "host:port" when enabled (e.g. "10.0.0.5:514")
tcp: false # false = UDP, true = TCP
otel:
enabled: false # true to export; endpoint is then required
endpoint: "" # e.g. "http://10.0.0.5:4317"
protocol: "grpc" # "grpc", "http/protobuf" or "http"
Air-gapped deployment¶
For deployments without internet access, MATVIS validates licenses locally using a signed
certificate instead of contacting the license server. No accountId, activationToken, or
licenseKey is required (all other secrets are still required).
- Obtain the offline license certificate (
license.lic) from MATVIS. - Create a Kubernetes secret:
- Switch the license to offline mode in
values.yaml:
Certificate expiry
The license certificate has an expiry date. Obtain a renewed certificate from MATVIS before expiry to avoid service interruption.
Install / upgrade / uninstall¶
Run all commands from the Helm chart directory.
Persistent data (PVCs) is not deleted automatically, see Operations.
After a successful install, it can take up to 5 minutes until all services are ready. Using the
default NodePorts, the dashboard is at http://<node-ip>:30300 and the API at
http://<node-ip>:30800. Replace <node-ip> with the IP of any node in your cluster, and make
sure the NodePorts are open for inbound traffic.
Operations¶
Restart a deployment¶
A rollout restart is required after enabling GPU acceleration so the new runtime settings apply:
This performs a rolling restart with zero downtime if replica counts allow it.
Delete persistent data¶
Irreversible
This permanently deletes all database contents.