Skip to content
Stand with Ukraine flag

Trendz Analytics Kubernetes 1.13.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:

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:

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

Upgrading Trendz Analytics to 1.13.2

Reduce pods count

The deployment must have exactly one running pod for the upgrade to succeed:

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

Create upgrade flag file

Get the current pod name:

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

Create the .upgradeversion flag file inside the pod, replacing <POD_NAME> with the name from the previous command. Set the version to the one you are currently running:

kubectl exec <POD_NAME> -- sh -c "echo '1.13.1' > /data/.upgradeversion"

Update image version

Open trendz-app-deployment.yml and update the image field to thingsboard/trendz:1.13.2:

nano trendz-app-deployment.yml

Apply the deployment

Apply the updated configuration and wait until the pod is ready:

kubectl apply -f trendz-app-deployment.yml

Verify the upgrade

Stream the pod logs to confirm the upgrade ran successfully:

kubectl logs -f <trendz-pod-name>

Look for the following lines:

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

Restore pods count

After the upgrade is complete, restore your preferred replica count:

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

Upload widget bundle to ThingsBoard

After the upgrade, upload the latest Trendz widget bundle and JS module to ThingsBoard. See the post-installation steps for details.

Upgrading Trendz Analytics to 1.13.1

Reduce pods count

The deployment must have exactly one running pod for the upgrade to succeed:

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

Create upgrade flag file

Get the current pod name:

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

Create the .upgradeversion flag file inside the pod, replacing <POD_NAME> with the name from the previous command. Set the version to the one you are currently running:

kubectl exec <POD_NAME> -- sh -c "echo '1.13.0' > /data/.upgradeversion"

Update image version

Open trendz-app-deployment.yml and update the image field to thingsboard/trendz:1.13.1:

nano trendz-app-deployment.yml

Apply the deployment

Apply the updated configuration and wait until the pod is ready:

kubectl apply -f trendz-app-deployment.yml

Verify the upgrade

Stream the pod logs to confirm the upgrade ran successfully:

kubectl logs -f <trendz-pod-name>

Look for the following lines:

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

Restore pods count

After the upgrade is complete, restore your preferred replica count:

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

Upload widget bundle to ThingsBoard

After the upgrade, upload the latest Trendz widget bundle and JS module to ThingsBoard. See the post-installation steps for details.

Upgrading Trendz Analytics to 1.13

Reduce pods count

The deployment must have exactly one running pod for the upgrade to succeed:

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

Create upgrade flag file

Get the current pod name:

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

Create the .upgradeversion flag file inside the pod, replacing <POD_NAME> with the name from the previous command. Set the version to the one you are currently running:

kubectl exec <POD_NAME> -- sh -c "echo '1.12.0' > /data/.upgradeversion"

Update image version

Open trendz-app-deployment.yml and update the image field to thingsboard/trendz:1.13.0:

nano trendz-app-deployment.yml

Apply the deployment

Apply the updated configuration and wait until the pod is ready:

kubectl apply -f trendz-app-deployment.yml

Verify the upgrade

Stream the pod logs to confirm the upgrade ran successfully:

kubectl logs -f <trendz-pod-name>

Look for the following lines:

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

Restore pods count

After the upgrade is complete, restore your preferred replica count:

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

Upload widget bundle to ThingsBoard

After the upgrade, upload the latest Trendz widget bundle and JS module to ThingsBoard. See the post-installation steps for details.