Concepts

  • Helm 2 and Helm 3 represent significant change in Kubernetes package management
  • Helm 2 which was deprecated in Nov 2020, used a server-side component called Tiller to manage deployments
  • Tiller was responsible for storing release information in ConfigMaps or Secrets within the Tiller namespace
  • Helm 3 eliminates Tiller entirely, adopting a client-only architecture where all management tasks are handled directly by the Helm binary
  • This change simplifies security and storage: Helm 3 now stores release data as Secrets in the deployment namespace rather than relying on Tiller’s namespace
  • Helm 2 to 3 migration involves updating configuration and release management to align with these changes.

Notes

This was what I had to do to migrate Helm 2 releases.

1. Install Helm2 and Tiller

Download Helm v2.17.0 from official github https://github.com/helm/helm/releases/tag/v2.17.0 Extract and move to bin

$ tar zvxf helm-v2.17.0-darwin-amd64.tar.gz
$ sudo mv darwin-amd64/helm /usr/local/bin/helm2
$ sudo mv darwin-amd64/tiller /usr/local/bin/

2. Install Helm 2to3 Plugin

$ helm plugin install https://github.com/helm/helm-2to3.git
$ helm 2to3 --help

Migrate and Cleanup Helm v2 configuration and releases in-place to Helm v3

Usage:
  2to3 [command]

Available Commands:
  cleanup     cleanup Helm v2 configuration, release data and Tiller deployment
  completion  Generate the autocompletion script for the specified shell
  convert     migrate Helm v2 release in-place to Helm v3
  help        Help about any command
  move        migrate Helm v2 configuration in-place to Helm v3

Flags:
  -h, --help   help for 2to3

Use "2to3 [command] --help" for more information about a command.

3. Start Tiller Locally

In my case, Tiller has been removed from my cluster, I had to start Tiller locally

$ tiller

Starting Tiller v2.16.1 (tls=false)
GRPC listening on :44134
Probes listening on :44135
Storage driver is ConfigMap
Max history per release is 0

4. Backup Helm 2 Release

Always backup!

Replace $TILLER_PORT with local tiller port from previous step, in my case it was 44134

$ helm2 --host localhost:$TILLER_PORT get values $RELEASE > backup-values.yaml
$ helm2 --host localhost:$TILLER_PORT get manifest $RELEASE > backup-manifest.yaml

5. Convert to Helm 3 Release

I used -s configmaps because in my case Tiller stored the release data in ConfigMaps

$ helm 2to3 convert $RELEASE --tiller-out-cluster -s configmaps --dry-run
$ helm 2to3 convert $RELEASE --tiller-out-cluster -s configmaps

6. Verify

$ helm list -n $NAMESPACE

7. (Optional) Cleanup Helm 2 Data

$ helm 2to3 cleanup --name $RELEASE --release-cleanup --tiller-out-cluster -s configmaps --dry-run
$ helm 2to3 cleanup --name $RELEASE --release-cleanup --tiller-out-cluster -s configmaps

Leave a comment