kubernetes中安裝helm

版本信息

Kubernetes 1.14.8

helm 2.16.3

1. 下載helm的binary文件地址爲: https://get.helm.sh/helm-v2.16.3-linux-amd64.tar.gz

2. 上傳到服務器中,並解壓 

tar -zxvf helm-v2.16.3-linux-amd64.tar.gz
mv linux-amd64/helm  /usr/local/bin/helm
chmod +x /usr/local/bin/helm

3. 創建RBAC, vi tiller-rbac.config.yaml

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

4. kubectl apply -f till-rbac-config.yaml
 

[root@controller ~]# kubectl apply -f till-rbac-config.yaml
serviceaccount/tiller created
clusterrolebinding.rbac.authorization.k8s.io/tiller created

5. 初始化helm

helm init --upgrade --service-account tiller  --tiller-image registry.cn-hangzhou.aliyuncs.com/google_containers/tiller:v2.16.3  --stable-repo-url https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts --tiller-tls-verify=false

6. 驗證

[root@controller ~]# helm search redis
NAME            CHART VERSION   APP VERSION     DESCRIPTION                                                 
stable/redis    1.1.15          4.0.8           Open source, advanced key-value store. It is often referr...
stable/redis-ha 2.0.1                           Highly available Redis cluster with multiple sentinels an...
stable/sensu    0.2.0                           Sensu monitoring framework backed by the Redis transport  

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章