Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Trendz Analytics Kubernetes 1.8.x Upgrade Instructions

← Back to all versions

Prepare for upgrading Trendz Analytics

Obtain Trendz Kubernetes scripts

Use the Kubernetes configuration files from your original installation. If you no longer have them, re-clone the repository and fill in your configuration values as described in the installation guide:

Terminal window
git clone https://github.com/thingsboard/trendz-k8s.git --depth 1

Connect to your Kubernetes cluster

Select the correct kube-config context before running any commands:

Terminal window
kubectl config get-contexts
Terminal window
kubectl config use-context <your-config-name>

Set trendz as the default namespace, so the commands below run in it:

Terminal window
kubectl config set-context --current --namespace=trendz

Back up the database

Back up the trendz database with pg_dump or your PostgreSQL provider's backup tools.

Upgrading Trendz Analytics to 1.8.2

Update image versions

Set the image versions to 1.8.2. Do not apply the files yet.

  • trendz-app-deployment.yml: thingsboard/trendz:1.8.2
  • trendz-python-executor-deployment.yml: thingsboard/trendz-python-executor:1.8.2

Stop Trendz

Terminal window
kubectl scale deployment trendz-app-deployment --replicas=0
kubectl wait --for=delete pod -l app=trendz-app-pod-label --timeout=120s

If the pods are already gone, kubectl wait may print no matching resources found. This is expected.

Create the upgrade job

trendz-upgrade.yml
apiVersion: batch/v1
kind: Job
metadata:
name: trendz-upgrade
namespace: trendz
spec:
backoffLimit: 0
template:
spec:
restartPolicy: Never
containers:
- name: trendz-upgrade
image: thingsboard/trendz:1.8.2
env:
- name: UPGRADE_TRENDZ
value: "true"
envFrom:
- configMapRef:
name: trendz-app-db-config
volumeMounts:
- name: trendz-app-config
mountPath: /trendz-config-files
volumes:
- name: trendz-app-config
configMap:
name: trendz-app-config
items:
- key: trendz.conf
path: trendz.conf
- key: logback.xml
path: logback.xml

The ConfigMap names, keys and namespace must match your trendz-app-deployment.yml. Installations created before 1.15 use the keys conf and logback.

Run the upgrade job

Terminal window
kubectl apply -f trendz-upgrade.yml
kubectl wait --for=condition=complete job/trendz-upgrade --timeout=900s

Verify the upgrade

Terminal window
kubectl logs job/trendz-upgrade

Expected output:

Start upgrading Trendz from version …
…
Current version is …, upgrade is not needed.

Delete the job

Terminal window
kubectl delete job trendz-upgrade

Start Trendz

Terminal window
kubectl apply -f trendz-python-executor-deployment.yml
kubectl apply -f trendz-app-deployment.yml

If you run more than one pod, restore the replica count:

Terminal window
kubectl scale deployment trendz-app-deployment --replicas=<pod-count>

Upgrading Trendz Analytics to 1.8.1

Reduce pod count

Scale the deployment to one pod:

Terminal window
kubectl scale deployment trendz-app-deployment --replicas=1

Create upgrade flag file

Get the pod name:

Terminal window
kubectl get pods -l app=trendz-app-pod-label

Create the flag file in the pod. Replace <POD_NAME> and set the version you are currently running:

Terminal window
kubectl exec <POD_NAME> -- sh -c "echo '1.7.0' > /data/.upgradeversion"

Update image version

In trendz-app-deployment.yml, set the image to thingsboard/trendz:1.8.1 and apply it:

Terminal window
kubectl apply -f trendz-app-deployment.yml

Verify the upgrade

Check the pod logs:

Terminal window
kubectl logs -f <trendz-pod-name>

Expected output:

Upgrading Trendz from version …
…
Current version is …, upgrade is not needed
…
Started TrendzApplication in …

Restore pod count

Terminal window
kubectl scale deployment trendz-app-deployment --replicas=<pod-count>