For my test Kubernetes cluster, Longhorn is used as the persistent block storage. The installed version is 1.6.2, and the version 1.7.0 is available now. So today, I’m going to share how to perform the Longhorn upgrade using Helm.

I’m going to try to do this live as usual. Of course, I already created snapshots for all my K8s nodes in case thing goes south.

First, let’s verify the current installed version of Longhorn [1].

[kenno@smaster ~]$ helm list -n longhorn-system
NAME            NAMESPACE       REVISION        UPDATED                                         STATUS          CHART           APP VERSION
longhorn        longhorn-system 2               2024-08-16 11:38:54.857834966 +1000 AEST        deployed        longhorn-1.6.2  v1.6.2

Next, refresh the Helm chart repo, and list the available version [2].

[kenno@smaster ~]$ helm repo  update longhorn
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "longhorn" chart repository
Update Complete. ⎈Happy Helming!⎈

[kenno@smaster ~]$ helm search repo longhorn -l
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
longhorn/longhorn       1.7.0           v1.7.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.6.2           v1.6.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.6.1           v1.6.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.6.0           v1.6.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.5           v1.5.5          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.4           v1.5.4          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.3           v1.5.3          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.2           v1.5.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.1           v1.5.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.5.0           v1.5.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.4.4           v1.4.4          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.4.3           v1.4.3          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.4.2           v1.4.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.4.1           v1.4.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.4.0           v1.4.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.3.3           v1.3.3          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.3.2           v1.3.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.3.1           v1.3.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.3.0           v1.3.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.6           v1.2.6          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.5           v1.2.5          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.4           v1.2.4          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.3           v1.2.3          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.2           v1.2.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.1           v1.2.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.2.0           v1.2.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.1.3           v1.1.3          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.1.2           v1.1.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.1.1           v1.1.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.1.0           v1.1.0          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.0.2           v1.0.2          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.0.1           v1.0.1          Longhorn is a distributed block storage system ...
longhorn/longhorn       1.0.0           v1.0.0          Longhorn is a distributed block storage system ...

We see that the latest version is 1.7.0. Let’s perform the upgrade.

[kenno@smaster ~]$ helm upgrade longhorn longhorn/longhorn --namespace longhorn-system --version 1.7.0
Release "longhorn" has been upgraded. Happy Helming!
NAME: longhorn
LAST DEPLOYED: Fri Aug 23 14:25:48 2024
NAMESPACE: longhorn-system
STATUS: deployed
REVISION: 3
TEST SUITE: None
NOTES:
Longhorn is now installed on the cluster!

Please wait a few minutes for other Longhorn components such as CSI deployments, Engine Images, and Instance Managers to be initialized.

Visit our documentation at https://longhorn.io/docs/

Finally, verify the installed version of Longhorn.

[kenno@smaster ~]$ helm list -n longhorn-system
NAME            NAMESPACE       REVISION        UPDATED                                         STATUS          CHART           APP VERSION
longhorn        longhorn-system 3               2024-08-23 14:25:48.264880552 +1000 AEST        deployed        longhorn-1.7.0  v1.7.0

Awesome!

References: