CentOS搭建k8s集群(5)—Helm包管理工具

Helm是用来管理Kubernetes发布包的工具,使用方法类似于yum、npm工具
原来:手写yaml –> xxx.yaml –> kubectl apply -f –> 获取xxx组件
现在:values.yaml –> 通过模板生成xxx.yaml –> helm install/upgrade –> 获取xxx组件

PS:以下操作都在master机器上
1、安装Helm3
Helm3.x版本移除了tiller依赖,所以只有一个helm文件
cd /tmp
wget https://get.helm.sh/helm-v3.4.0-linux-amd64.tar.gz
tar -zxvf helm-v3.4.0-linux-amd64.tar.gz
mv linux-amd64/helm /usr/local/bin/helm

2、配置环境变量
vi /etc/profile
加入:
export KUBECONFIG=/root/.kube/config
执行:
source /etc/profile

3、安装Helm Chart仓库
helm repo add stable https://charts.helm.sh/stable
helm repo add gitlab https://charts.gitlab.io/
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm repo add nginx https://helm.nginx.com/stable

4、显示仓库charts信息
helm repo update
helm search repo stable

参考资料:
https://github.com/helm/helm/releases
https://helm.sh/docs/intro/quickstart/