k3s-安装helm客户端

文章目录
  1. 1. 下载安装helm
  2. 2. 配置集群参数
  3. 3. 更新安装源
  4. 4. 命令测试

下载安装helm

helm地址:https://github.com/helm/helm/releases/tag/v3.5.0

1
2
3
4
5
wget https://get.helm.sh/helm-v3.5.0-linux-amd64.tar.gz
tar -zxvf helm-v3.5.0-linux-amd64.tar.gz
chmod 755 linux-amd64/helm
cp linux-amd64/helm /usr/bin/
cp linux-amd64/helm /usr/local/bin/

配置集群参数

vi ~/.bashrc

添加环境变量:

1
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

添加完之后,测试helm是否正常: helm version

更新安装源

国外源:

1
2
helm repo add stable https://charts.helm.sh/stable
helm repo update

国内源:

1
2
helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm repo update

删除某个源:

1
helm repo remove stable

查看helm列表:

1
helm list

命令测试

1
2
3
4
5
helm search hub wordpress  
helm search hub mysql
helm install happy-panda stable/mariadb
helm status happy-panda
helm show values stable/mariadb