Stand with Ukraine flag
Try it now Pricing
Trendz Analytics
Installation > Upgrade instructions > Kubernetes
Getting Started Documentation Guides
On this page

Kubernetes

Upgrading to 1.11.0

These steps are applicable for 1.10.3 Trendz Analytics version.

Obtain Trendz Kubernetes scripts

Use the Kubernetes configuration files used for installation. If you did not save the files you need to download them again by the next link and fill in by necessary data as in the installation guide:

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

Connect to your Kubernetes cluster

You need to connect to the dedicated kube-config configuration Use the next commands:

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

Reduce pods count

The deployment must have only one pod for the next steps of a successful upgrade. Use this command to set the pod count:

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

Create flag-file

Create a file “.upgradeversion” inside the directory by calling the command that must be executed by Trendz pod. Run the command:

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

You can get the pod name by the command:

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

Use another version instead of ‘1.10.3’ if another is needed

Change image version

Open the trendz-app-deployment.yml file with the command

1
nano trendz-app-deployment.yml

and change the image version:

image

Apply the deployment file

Use the command to apply the new configuration of the deployment and wait until the pods are ready:

1
kubectl apply -f trendz-app-deployment.yml

Check the logs

Now check the logs and be sure that the instance is started successfully and the upgrade was performed. The logs can be opened by the command:

1
kubectl logs -f <trendz-pod-name>

There should be the following lines:

1
2
3
4
5
Upgrading Trendz from version … 
…
Current version is …, upgrade is not needed
…
Started TrendzApplication in …

Increase pods count

Now you can return your preferred pod count to the deployment. Use this command to set the pod count:

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