helm 之 安装

简介: helm安装以及初始化

helm 安装

- 下载

helm releases 版本下载地址:https://github.com/helm/helm/releases

- 准备

1,解压并拷贝

tar -xzvf helm-v2.12.0-linux-amd64.tar.gz
cd linux-amd64 && mv helm /usr/bin/

压缩中包含两个可执行文件helm,tiller。其中tiller为server,若采用容器化部署到kubernetes中,则可以不用管tiller,只需将helm复制到/usr/bin目录即可。

2,创建tiller用户

kubectl create serviceaccount --namespace kube-system tiller
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

创建初始化helm时的账户,否则在helm使用时容易报出权限错误:Error: namespaces "kubeapps" is forbidden: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "kubeapps"

若helm已经部署完成未指定tiller serviceaccount 而报错,则可以将tiller更新到deploy中(若为初始化,不用执行此步)

kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'

- 初始化

helm init --tiller-image=sapcc/tiller:v2.12.0 --service-account tiller

此处指定tiller的镜像为docker hub上的tiller对应镜像:sapcc/tiller;
由于从Google上下载镜像可能存在网络不通的情况(如下图错误:Failed to pull image "gcr.io/kubernetes-helm/tiller:v2.12.0": rpc error: code = Unknown desc = Error response from daemon: Get https://gcr.io/v1/_ping: dial tcp 108.177.125.82:443: i/o timeout
image

helm version

若出现如下两行信息说明部署成功
Client: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.12.0", GitCommit:"d325d2a9c179b33af1a024cdb5a4472b6288016a", GitTreeState:"clean"}

- 卸载

helm reset

Tiller (the Helm server-side component) has been uninstalled from your Kubernetes Cluster.

目录
相关文章
|
6月前
|
Kubernetes 应用服务中间件 Linux
helm安装和使用-通过helm部署k8s应用
helm安装和使用-通过helm部署k8s应用
|
6月前
|
Kubernetes NoSQL 关系型数据库
通过helm部署gitlab服务
通过helm部署gitlab服务
|
2月前
|
Kubernetes 关系型数据库 数据库
使用 Helm 部署 Wikijs
使用 Helm 部署 Wikijs
|
4月前
|
Kubernetes 安全 容器
007_安装helm
007_安装helm
59 0
|
2月前
|
Kubernetes 数据安全/隐私保护 容器
|
4月前
|
Kubernetes Cloud Native Docker
如何将自己的镜像使用 helm 部署
如何将自己的镜像使用 helm 部署
112 0
如何将自己的镜像使用 helm 部署
|
7月前
|
关系型数据库 MySQL Perl
入门Helm(2)
入门Helm(2)
44 2
|
8月前
|
存储 Kubernetes 容器
入门Helm
入门Helm
200 2
|
8月前
|
Kubernetes 关系型数据库 容器
Helm入门
Helm入门
201 0
|
11月前
|
Kubernetes Ubuntu Linux
helm安装
helm安装
224 0