Azure AKS Update from Helm2 to Helm3

Introduction

If we use Helm2 in our environment, it would be good to think about updating it to version 3, due to the fact that it will soon cease to be supported

What is HELM ?

Simply put, it’s a package manager like yum or apt for Kubernetes.

Helm2 End Of Life

Users installing applications using Helm2 on Azure Kubernetes Service receive the following email.

Upgrade from using Helm 2 to Helm 3 for your AKS cluster(s)
You’re receiving this email because you have Azure Kubernetes Services (AKS) cluster(s) running Tiller, which is installed as part of Helm 2.

It’s a message recommending an update to Helm 3 as Helm 2 will no longer be supported. More about deprecation timeline below

Upgrade Helm2 to Helm3

Preparation

  • Get the AKS status in advance.
kubectl get ns
kubectl get all -n kube-system
kubectl get all -n example-namespace
  • Download the latest version of Helm v3 from this link
  • Rename the downloaded file to helm3. By doing this, the helm command will be executed in helm2 and the helm3 command will be executed in helm3.
  • Check the version of helm2
root@vagrant:/home/vagrant# helm  version
Client: &version.Version{SemVer:"v2.16.10", GitCommit:"bceca24a91639f045f22ab0f41e47589a932cf5e", GitTreeState:"clean"}
  • Check the version of helm3
root@vagrant:/home/vagrant# helm3 version
version.BuildInfo{Version:"v3.6.2", GitCommit:"ee407bdf364942bcb8e8c665f82e15aa28009b71", GitTreeState:"clean", GoVersion:"go1.16.5"}
root@vagrant:/home/vagrant#

Migration

  • Install the helm2to3 plugin
root@vagrant:/home/vagrant# helm3  plugin install https://github.com/helm/helm-2to3
  • Check the helm3 plugin list.
root@vagrant:/home/vagrant# helm3 plugin list
NAME VERSION DESCRIPTION
2to3 0.9.0 migrate and cleanup Helm v2 configuration and releases in-place to Helm v3
  • Migrate the helm2 config.
root@vagrant:/home/vagrant# helm3 2to3 move config
  • Migrate Helm2 release.
root@vagrant:/home/vagrant# helm3 2to3 convert --dry-run [Release Name]

Post-status check

We need again check AKS status

kubectl get ns
kubectl get all -n kube-system
kubectl get all -n example-namespace

Delete old data

Use the cleanup command to remove old data. After execution, the tiller in kube-system will be deleted. First, give the dry-run option and simulate.

root@vagrant:/home/vagrant# helm3 2to3 convert cleanup

After this command deployment.apps/tiller-deploy should be removed, we can check this with kubectl get all -n kube-system

Post-work

  • Rename helm3 to helm.
  • Update the Helm repository.

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store