Post

Longhorn: Migrating from Cluster Manager to Cluster Explorer

Longhorn: Migrating from Cluster Manager to Cluster Explorer

Longhorn logo

What is Longhorn?

So if you have a Kubernetes cluster, chances are you want to use the local storage on your nodes in a pool to run your cluster with. In my opinion, the only real option for this kind of setup is Longhorn. I’ve been using Longhorn for about a year and when I first installed it, I did it quickly and easily though the Rancher interface. Between the reliability of the storage and the seamless integration with Rancher, Longhorn has been absolutely amazing.

Then what is the problem?

Rancher has had 2 different interfaces for a while – Cluster Manager (the older one) and Cluster Explorer (the newer one). Cluster Manager was a great start but Rancher realized that its inherent design left it limited for areas like multi-tenancy and so it began working on a new interface that was more suited for bigger and better things. In both UIs, Rancher tries to make things easier for its users and offers “Apps”. Apps are just helm charts but it fills in a lot for you and runs it locally on the cluster so you never have to even drop to terminal.

So a lot of us installed these apps in the older interface and things were great. Then Rancher decided its new interface was ready for use and swapped the default interface to Cluster Explorer. While a welcome change in some ways, it was unwelcome in other ways. Apps that had been installed in the old interface no longer appeared nor were manageable in Cluster Explorer. That means you can’t upgrade, change, or even remove the application unless you go into terminal and run some commands/scripts/crds/etc. This was not ideal for many of us.

How do we fix this?

Long story short, you don’t. The old interface using Helm 2 and the new interface uses Helm 3. There was a migration project called Helm 2to3 but for whatever reason, the way Cluster Manager installed it didn’t play nice with the conversion. There is no way to easily upgrade, but there is a hard way.

My recommendation is to backup everything to S3 or NFS storage, follow the uninstall instructions, and then reinstall using Cluster Explorer or just using Helm on your own. After which, you can restore your volumes and proceed as normal. While not ideal, I would much rather play it safe with my Kubernetes storage than something that might break down the line because of some hacks I did previously.

P.S. Make sure to follow the uninstall instructions carefully and give the operations time to finish, otherwise you might end up in a bad situation where you’ll have your backups delete themselves. Shoutout to @JenTing for helping me through that.

Bonus!

After reaching out to the Longhorn team about the incompatability, I received this explanation from Vincent:

Technically it was still Helm before, but Tiller in Helm 2 had no concept of multi-tenancy and everyone ran it as admin and let anyone with access deploy whatever they wanted through it. So we added an “Apps” middleman that ran Tiller for you, only on-demand, as the user requesting the operation instead of giving away arbitrary admin. Helm 3 does the same on its own (while eliminating the daemon  entirely) so our abstraction is no longer needed or useful.  And they have their own problems upgrading from 2->3 even without involving us. You can manage existing old Apps, under Legacy in the left nav when a single Project is selected in the filter at the top of the UI.  They are not “gone”.

This post is licensed under CC BY 4.0 by the author.