文章目录
- Installing Helm
- 安装Helm
- From The Helm Project
- 通过Helm项目
- From the Binary Releases
- 通过二进制发布
- From Script
- 通过脚本
- Through Package Managers
- 通过包管理器
- From Homebrew (macOS)
- 通过Homebrew(macOS)
- From Chocolatey (Windows)
- 通过Chocolatey (Windows)
- From Apt (Debian/Ubuntu)
- 通过Apt(Debian/Ubuntu)
- From Snap
- 通过snap
- From pkg (FreeBSD)
- 通过pkg(FreeBSD)
- Development Builds
- 开发版本
- From Canary Builds
- 通过Cananry构建
- From Source (Linux, macOS)
- 通过源代码(Linux,macOS)
- Conclusion
- 结论
Installing Helm
This guide shows how to install the Helm CLI. Helm can be installed either from source, or from pre-built binary releases.
安装Helm
这份指南将展示如何安装Helm命令行界面.Helm可以通过源代码安装或者通过预构建的二进制发布安装.
From The Helm Project
The Helm project provides two ways to fetch and install Helm. These are the official methods to get Helm releases. In addition to that, the Helm community provides methods to install Helm through different package managers. Installation through those methods can be found below the official methods.
通过Helm项目
Helm项目提供了两种方式来获得和安装Helm.这些都是官方方式来获取Helm的发布.额外的,Helm社区提供了通过不同包管理器来安装Helm.这些安装方法在官方方法的下面
From the Binary Releases
Every release of Helm provides binary releases for a variety of OSes. These binary versions can be manually downloaded and installed.
- Download your desired version
- Unpack it (tar -zxvf helm-v3.0.0-linux-amd64.tar.gz)
- Find the helm binary in the unpacked directory, and move it to its desired destination (mv linux-amd64/helm /usr/local/bin/helm)
From there, you should be able to run the client and add the stable repo: helm help.
Note: Helm automated tests are performed for Linux AMD64 only during CircleCi builds and releases. Testing of other OSes are the responsibility of the community requesting Helm for the OS in question.
通过二进制发布
每一次Helm发布都为各种OS提供了二进制包.这些二进制版本可以手工下载和安装.
- 下载你期望的版本
- 解压缩(tar -zxvf helm-v3.0.0-linux-amd64.tar.gz)
- 在解压缩文件夹里找到helm二进制文件并把它移动到期望的位置 (mv linux-amd64/helm /usr/local/bin/helm).此时,你应该可以运行客户端和添加稳定版仓库:helm help
注意:在64位Linux架构里只有CircleCi构建和发布的情况下Helm的自动匹配测试才会执行.其他操作系统的测试是社区的责任.
From Script
Helm now has an installer script that will automatically grab the latest version of Helm and install it locally.
You can fetch that script, and then execute it locally. It’s well documented so that you can read through it and understand what it is doing before you run it.
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
Yes, you can curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash if you want to live on the edge.
通过脚本
Helm现在有一个安装脚本会自动获取最新版本并在本地安装.
你可以获取这个脚本并在本地安装.它有着完善的文档所有你可以在运行它之前通读它从而知道它在做什么
$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh
是的,如果你想潇洒也可以直接执行curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
Through Package Managers
The Helm community provides the ability to install Helm through operating system package managers. These are not supported by the Helm project and are not considered trusted 3rd parties.
通过包管理器
Helm社区提供了通过操作系统包管理器来安装Helm.这并没有被Helm项目支持并不能被认为是受信任的第三方.
From Homebrew (macOS)
Members of the Helm community have contributed a Helm formula build to Homebrew. This formula is generally up to date.
brew install helm
(Note: There is also a formula for emacs-helm, which is a different project.)
通过Homebrew(macOS)
Helm社区的成员为Homebrew贡献了一个Helm公式,这个公式通常是最新的.
brew install helm
(注意:这也是另一个项目emacs-helm的公式)
From Chocolatey (Windows)
Members of the Helm community have contributed a Helm package build to Chocolatey. This package is generally up to date.
choco install kubernetes-helm
通过Chocolatey (Windows)
Helm社区为Chocolatey贡献了一个Helm安装包,这个安装包通常是最新的.
choco install kubernetes-helm
From Apt (Debian/Ubuntu)
Members of the Helm community have contributed a Helm package for Apt. This package is generally up to date.
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
通过Apt(Debian/Ubuntu)
Helm社区为Apt贡献了一个Helm安装包,这个通常是最新的.
curl https://baltocdn.com/helm/signing.asc | sudo apt-key add -
sudo apt-get install apt-transport-https --yes
echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list
sudo apt-get update
sudo apt-get install helm
From Snap
The Snapcrafters community maintains the Snap version of the Helm package:
sudo snap install helm --classic
通过snap
Snapcrafter社区维护着Helm安装包的Snap版本
sudo snap install helm --classic
From pkg (FreeBSD)
Members of the FreeBSD community have contributed a Helm package build to the FreeBSD Ports Collection. This package is generally up to date.
pkg install helm
通过pkg(FreeBSD)
FreeBSD社区向FreeBSD端口集贡献了一个Helm安装包,这个安装包通常是最新的。
pkg install helm
Development Builds
In addition to releases you can download or install development snapshots of Helm.
开发版本
额外的你可以下载和安装Helm的开发版本快照
From Canary Builds
“Canary” builds are versions of the Helm software that are built from the latest master branch. They are not official releases, and may not be stable. However, they offer the opportunity to test the cutting edge features.
Canary Helm binaries are stored at get.helm.sh. Here are links to the common builds:
- Linux AMD64
- macOS AMD64
- Experimental Windows AMD64
通过Cananry构建
Cananry构建是通过最新主分支构建的Helm版本。他们不是官方发布,也可能不稳定。无论如何,它们提供了测试最新特性的机会。
Cananry的Helm版本存在get.helm.sh,这是普通构建的链接
- Linux AMD64
- macOS AMD64
- Experimental Windows AMD64
From Source (Linux, macOS)
Building Helm from source is slightly more work, but is the best way to go if you want to test the latest (pre-release) Helm version.
You must have a working Go environment.
$ git clone https://github.com/helm/helm.git
$ cd helm
$ make
If required, it will fetch the dependencies and cache them, and validate configuration. It will then compile helm and place it in bin/helm.
通过源代码(Linux,macOS)
通过源代码构建Helm稍稍多一点工作,但是这是你想测试最新(预发布)Helm版本的最好方式。
你必须有一个可用的Go环境。
$ git clone https://github.com/helm/helm.git
$ cd helm
$ make
如果需要,它将获取依赖并缓存他们并验证配置。然后编译helm并把它放在bin/helm
Conclusion
In most cases, installation is as simple as getting a pre-built helm binary. This document covers additional cases for those who want to do more sophisticated things with Helm.
Once you have the Helm Client successfully installed, you can move on to using Helm to manage charts and add the stable repo.
结论
在大多数情况下,安装只是简单的获取一个预构建的二进制文件。这份文档涵盖了那些获取Helm更复杂的东西的情况。
一旦你成功的安装了Helm客户端,你可以继续使用Helm来管理chart和添加稳定的安装源。