Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to complete Helm3 migration at one time

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to complete Helm3 migration at one time". In daily operation, I believe many people have doubts about how to complete Helm3 migration at one time. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful for you to answer the doubts of "how to complete Helm3 migration at one time". Next, please follow the editor to study!

Download Helm 3 binaries

We tested Helm 2 and the latest version, so we should have two versions of binaries ready before Helm 2 is completely uninstalled. Download the latest Stable version of the binary and add it to your PATH. Rename the existing v2 binary to helm2 and the latest version to helm3. I saved both versions in / usr/local/bin so that I could switch them at any time:

➜helm2 version Client: & version.Version {SemVer: "v2.16.0", GitCommit: "e13bc94621d4ef666270cfbe734aaabf342a49bb", GitTreeState: "clean"} Server: & version.Version {SemVer: "v2.14.3", GitCommit: "0e7f3b6637f7af8fcfddb3d2941fcc7cbebb0085", GitTreeState: "clean"}➜ helm3 version version.BuildInfo {Version: "v3.0.1", GitCommit: "7c22ef9ce89e0ebeb7125ba2ebf7d421f3e82ffa", GitTreeState: "clean", GoVersion: "go1.13.4"} prepare CI script and Chart

Before you run the upgrade process, you need to make sure that your CI script and custom Chart are compatible with Helm 3. While the OpenAPI authentication mechanism is interesting, it is likely to catch you off guard:

➜helm install prometheus. Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: ValidationError (Deployment.spec.template.spec.containers\ [0\] .volumeMounts\ [0\]): unknown field "defaultMode" in io.k8s.api.core.v1.VolumeMount

Once you've solved all these troublesome problems, you can start migrating to Helm 3!

Migrate Helm configuration

If you run Helm on a build agent in a CI system such as Jenkins, TeamCity, or TravisCI, you can do this. If you are running Helm on your local machine or on a central server with a persistent file system, be sure to migrate throughout the configuration, especially if you have your own Helm repo or use custom plug-ins. Either way, make sure you have read through this section to determine if it has anything to do with you.

Migrated version (keep Tiller)

Now, we have several ways to achieve migration. You can migrate a specific version to Helm 3 for some testing, which can be found in Helm's official blog. You can also choose to migrate many versions and remove them all from Tiller. Personally, I found it easier to migrate all versions to a given environment at once, but I needed to keep the release data in Tiller until I was sure that Helm 2 was not used anywhere in our environment. In this way, there are no blind spots, and everything uses the same version of Helm:

# List Helm 2 Releases # omit-tls flag if you're not using TLS RELEASES=$ (helm list-tls-aq) # Loop through releases and, for each one, test conversion while IFS= read-r release; do helm3 2to3 convert $release-dry-run done

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report