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  

 

你可能感兴趣的:(K8S,helm)