码迷,mamicode.com
首页 > 其他好文 > 详细

安装 helm2

时间:2020-06-21 09:51:07      阅读:166      评论:0      收藏:0      [点我收藏+]

标签:ada   server   min   OLE   sphere   version   account   uber   uid   

helm2 的架构跟 helm3 的架构不同。
在 helm2 架构中,helm 是客户端,tiller 是服务端部署在 k8s 集群内部。

技术图片

1、使用二进制包安装 helm 客户端

wget https://get.helm.sh/helm-v2.16.9-linux-amd64.tar.gz
tar xvf helm-v2.16.9-linux-amd64.tar.gz
cd linux-amd64
cp -a helm /usr/local/bin/

2、设置命令行自动补全

echo "source <(helm completion bash)" >> ~/.bashrc

3、安装 tiller 服务端

kubectl apply -f helm-rbac.yam
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: tiller
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: tiller
    namespace: kube-system
helm init --service-account tiller --tiller-image=registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.16.6 --stable-repo-url http://mirror.azure.cn/kubernetes/charts

kubectl get deployment tiller-deploy -n kube-system

helm version
Client: &version.Version{SemVer:"v2.16.9", GitCommit:"8ad7037828e5a0fca1009dabe290130da6368e39", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.16.6", GitCommit:"dd2e5695da88625b190e6b22e9542550ab503a47", GitTreeState:"clean"}

4、添加 repo

helm repo add stable http://mirror.azure.cn/kubernetes/charts
helm repo add incubator http://mirror.azure.cn/kubernetes/charts-incubator
helm repo add svc-cat http://mirror.azure.cn/kubernetes/svc-catalog-charts

5、更新 repo

helm repo update

6、安装一个 app

helm install stable/nginx-ingress --name nginx-ingress --namespace nginx-ingress
helm install stable/owncloud --name owncloud --namespace owncloud
helm ls -a

7、删除一个 app

helm delete --purge owncloud

8、卸载 helm(tiller)

helm reset --force
kubectl delete service/tiller-deploy -n kube-system
kubectl delete deployment.apps/tiller-deploy -n kube-system

参考:
https://devopscube.com/install-configure-helm-kubernetes/
https://github.com/helm/helm/releases
https://helm.sh/docs/intro/install/
https://helm.sh/docs/helm/helm_completion/
https://github.com/helm/charts
https://hub.helm.sh/charts
https://github.com/goharbor/harbor-helm
https://kubesphere.com.cn/docs/zh-CN/developer/helm-developer-guide/

安装 helm2

标签:ada   server   min   OLE   sphere   version   account   uber   uid   

原文地址:https://www.cnblogs.com/keithtt/p/13171160.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!