Upgrades & Rollback
Upgrade a self-hosted Dynamiq release safely, roll back when it goes wrong, and understand what uninstall leaves behind.
This page covers moving a running self-hosted install between chart versions and undoing an upgrade. It assumes the canonical layout from Install on Kubernetes (Helm) — release name dynamiq in namespace dynamiq, values in values.yaml (plus a provider file like values-aws.yaml if you use one). Every upgrade re-runs the same schema validation and database migrations the install does, so the risk lives in schema changes and forward-only migrations — plan for both before you run anything.
Before you upgrade
An upgrade is the same helm upgrade --install you ran to install, pointed at a newer chart version. Prepare it deliberately:
-
Pin the exact target version. Choose a specific
--version— neverlatest. Image tags default to the chart's app version, so pinning the chart pins the matching images (Overview → Distribution). -
Read the release notes. Dynamiq publishes what changed between versions, including new required values and breaking migrations. Contact Dynamiq if you don't have them for your target version.
-
Diff the default values. The chart is a private OCI artifact, so authenticate first, then compare the defaults of your current and target versions:
helm registry login registry-1.docker.io \ --username "$DYNAMIQ_REGISTRY_USER" \ --password "$DYNAMIQ_REGISTRY_TOKEN" helm show values oci://registry-1.docker.io/dynamiqai/dynamiq --version 0.39.0 > current-defaults.yaml helm show values oci://registry-1.docker.io/dynamiqai/dynamiq --version <new> > new-defaults.yaml diff current-defaults.yaml new-defaults.yaml -
Check for new required keys. A newer chart can add keys to its
values.schema.json. Those are validated the moment you upgrade, so a value that installed cleanly on the old version can be rejected by the new one — schema validation fails the upgrade before anything is applied to the cluster, so fix the values and re-run. Render the new version against your values file first to catch it dry:helm template dynamiq oci://registry-1.docker.io/dynamiqai/dynamiq \ --version <new> -n dynamiq -f values.yaml > /dev/null
Back up Postgres first. Database migrations run automatically during the upgrade and are not reversible (see below), so a fresh backup is your only path back to the pre-upgrade schema. Take it immediately before upgrading — see Backup and restore.
Upgrade
Run the same command as the install, with the new --version. Include every -f file you installed with — Helm does not remember files from previous releases:
helm upgrade --install dynamiq \
oci://registry-1.docker.io/dynamiqai/dynamiq \
--version <new> \
--namespace dynamiq \
-f values.yaml
# add -f values-aws.yaml (or your provider file) if you used oneHelm validates values.yaml against the new chart's JSON schema, renders the manifests, and applies them. The Deployments roll to the new image tags — which follow the chart's app version unless you pinned a service to a specific tag with <svc>.image.tag:
nexus:
image:
tag: "0.39.0"The database migration Job re-runs as a post-upgrade Helm hook, exactly as it does on install — it blocks the helm upgrade command until it finishes, and Helm deletes it on success. The semantics and how to watch it are identical to install Step 7; if the hook fails, the upgrade errors and the failed Job persists for inspection.
For zero-downtime upgrades, run at least 2 replicas of each public service (or enable autoscaling) so the rolling update always keeps a pod serving. Single-replica services — the chart's default — have a brief gap while the one pod is replaced. See Sizing, scheduling, autoscaling.
Roll back
List the release history, then roll back to a previous revision:
helm history dynamiq -n dynamiq
helm rollback dynamiq <revision> -n dynamiqhelm rollback restores the Kubernetes objects — Deployments, ConfigMaps, and the like — from the target revision, so the pods return to the previous image tags and configuration.
Rollback does not revert database migrations. The migration Job runs only on post-install and post-upgrade — it is not triggered by helm rollback — and the Atlas migrations it applies are forward-only. Rolling the chart back to an older app version therefore leaves the database on the newer schema, which the older code may not understand. If the upgrade you're undoing ran a schema migration, roll back the release and restore Postgres from the pre-upgrade backup you took above. A helm rollback alone is safe only when no migration ran between the two revisions.
Because the failed-forward path can leave the database ahead of the code, the reliable recovery for a bad schema-migrating upgrade is: restore the database snapshot, then helm rollback (or re-upgrade) to the version that matches it. Restore order and the state that lives where are covered in Backup and restore.
Uninstall
Remove the release with:
helm uninstall dynamiq -n dynamiqThis deletes only what the chart created and still owns — the five Deployments, their Services, ConfigMaps, ingresses or routes, and any Helm-managed Secret. Several things deliberately survive:
- Secrets you pre-created —
nexus,nexus-db,synapse,synapse-db,catalyst,catalyst-db,runtime, and the license Secret (install Step 4) are not owned by the release, so they remain. Delete them by hand if you're tearing down for good. - The
docker-registrypull Secret — remains if you created it withkubectl(install Step 2, Option B). It is deleted if you let the chart manage it viadynamiq.imageCredentials, since then it belongs to the release. - Your external services — Postgres, NATS, and the S3 bucket are never managed by the chart, so uninstall does not touch them or your data. Feature-namespace workload state (inference and database pods nexus scheduled) lives outside the release too.
- The migration hook Job — already deleted after the last successful install or upgrade, so there is normally nothing to clean up. A Job left behind by a failed hook must be removed manually.
Chart-created namespaces are deleted on uninstall. When you set dynamiq.features.createNamespaces: true, the chart creates the feature namespaces (dynamiq-inferences, dynamiq-databases, dynamiq-fine-tuning) with no helm.sh/resource-policy by default — so helm uninstall deletes them and everything inside. To keep them, set helm.sh/resource-policy: keep in dynamiq.features.namespaceAnnotations before uninstalling, or create the namespaces yourself (the install default, createNamespaces: false), which keeps their lifecycle independent of the release. This matches the warning in install Step 1.
Next steps
Networking, DNS & TLS
Expose self-hosted Dynamiq: the hostname map, Ingress and Gateway API, wildcard certificates, and internal service traffic.
Operations & Troubleshooting
Day-two operations for self-hosted Dynamiq: health checks, logs, scaling, backup and restore, and fixes for the failures you'll actually hit.