Trendz Analytics Kubernetes 1.14.x Upgrade Instructions
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 1Connect to your Kubernetes cluster
Select the correct kube-config context before running any commands:
kubectl config get-contextskubectl config use-context <your-config-name>Set trendz as the default namespace, so the commands below run in it:
kubectl config set-context --current --namespace=trendzBack up the database
Back up the trendz database with pg_dump or your PostgreSQL provider's backup tools.
Upgrading Trendz Analytics to 1.14.0
Reduce pod count
Scale the deployment to one pod:
kubectl scale deployment trendz-app-deployment --replicas=1Create upgrade flag file
Get the pod name:
kubectl get pods -l app=trendz-app-pod-labelCreate the flag file in the pod. Replace <POD_NAME> and set the version you are currently running:
kubectl exec <POD_NAME> -- sh -c "echo '1.13.2' > /data/.upgradeversion"Update image version
In trendz-app-deployment.yml, set the image to thingsboard/trendz:1.14.0 and apply it:
kubectl apply -f trendz-app-deployment.ymlVerify the upgrade
Check the pod logs:
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
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.
Was this helpful?