k8s helm v2 to v3 migration
2020-04 Steps
- NOTE: 202005 Migration is really easy, get some pod resarts, and helm3 linting is stricter, found some templates that needed fixing.
- Assumes v2 was tillerless, else remove the --tiller-out-cluster
set env
$ export en=dev $ export ch=main
convert helm 2 to 3
$ helm 2to3 convert --tiller-out-cluster --namespace $ch-$en $ch-$en
remove --dry-run from commandline.
$ time helm upgrade --namespace $ch-$en --install -f git/build.manifest/artifacts.yaml -f git/9s/9spokeshelmchart/env/9spokes/$en/values.yaml $ch-$en git/9s/9spokeshelmchart/ --atomic --debug --dry-run Release "nsp-main" has been upgraded. Happy Helming!
Later cleanup
$ helm3 2to3 cleanup -tiller-out-cluster
Live v2 to v3 migration might need these annotation added
ONLY helm version >= 3.2 $ helm version
Add to v2 and then migrate
KIND=deployment NAME=my-app-staging RELEASE=staging NAMESPACE=default kubectl annotate $KIND $NAME meta.helm.sh/release-name=$RELEASE kubectl annotate $KIND $NAME meta.helm.sh/release-namespace=$NAMESPACE kubectl label $KIND $NAME app.kubernetes.io/managed-by=Helm