Helm 是 Kubernetes 的包管理器。包管理器类似于我们在 Ubuntu 中使用的apt、Centos中使用的yum 或者Python中的 pip 一样,能快速查找、下载和安装软件包。Helm 由客户端组件 helm 和服务端组件 Tiller 组成, 能够将一组K8S资源打包统一管理, 是查找、共享和使用为Kubernetes构建的软件的最佳方式
[root@master ]# tar -zxvf helm-v3.3.4-linux-amd64.tar.gz
linux-amd64/
linux-amd64/README.md
linux-amd64/LICENSE
linux-amd64/helm
[root@master ]# ll
total 12460
-rw-r--r--. 1 root root 12752995 Oct 22 02:05 helm-v3.3.4-linux-amd64.tar.gz
drwxr-xr-x. 2 3434 3434 50 Sep 23 06:17 linux-amd64
[root@master ]# cd linux-amd64/
[root@master linux-amd64]# ll
total 38748
-rwxr-xr-x. 1 3434 3434 39661568 Sep 23 06:15 helm
-rw-r--r--. 1 3434 3434 11373 Sep 23 06:17 LICENSE
-rw-r--r--. 1 3434 3434 3308 Sep 23 06:17 README.md
[root@master linux-amd64]# mv helm /usr/local/bin/helm
[root@master linux-amd64]# helm help
The Kubernetes package manager
Common actions for Helm:
- helm search: search for charts
[root@master linux-amd64]# helm repo add stable https://kubernetes-charts.storage.googleapis.com/
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /root/.kube/config
WARNING: Kubernetes configuration file is world-readable. This is insecure. Location: /root/.kube/config
"stable" has been added to your repositories
helm repo add apphub https://apphub.aliyuncs.com
helm repo update
helm install nfs-client-provisioner \
--set storageClass.name=nfs-client \
--set storageClass.defaultClass=true \
--set nfs.server=192.168.0.51 \
--set nfs.path=/home/summer/work \
apphub/nfs-client-provisioner
[root@master]# kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
nfs-client (default) cluster.local/nfs-client-provisioner Delete Immediate true 7s