安装helm

直接下载一个二级制,然后解压到/usr/local下就行:

下载地址:

https://github.com/helm/helm/releases

  1. Download your desired version
  2. Unpack it (tar -zxvf helm-v3.0.0-linux-amd64.tar.gz)
  3. Find the helm binary in the unpacked directory, and move it to its desired destination (mv linux-amd64/helm /usr/local/bin/helm)

 

helm使用:

查看版本

# helm version

查看当前安装的charts

#helm list

查询 charts

#helm search redis

安装charts

#helm install --name redis --namespaces prod bitnami/redis

查看charts状态

#helm status redis

删除charts

#helm delete --purge redis

增加repo

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

#helm repo add --username admin --password password myharbor https://harbor.qing.cn/chartrepo/charts

更新repo仓库资源

#helm repo update

创建charts

#helm create helm_charts

测试charts语法

# helm lint

打包charts

#cd helm_charts && helm package ./

查看生成的yaml文件

#helm template helm_charts-0.1.1.tgz

更新image

#helm upgrade --set image.tag=‘v2019-05-09-18-48-40’ study-api-en-oral myharbor/study-api-en-oral

回滚relase

#helm hist study-api-en-oral

#helm rollback study-api-en-oral 4
helm repo add  elastic    https://helm.elastic.co       
helm repo add  gitlab     https://charts.gitlab.io       
helm repo add  harbor     https://helm.goharbor.io       
helm repo add  bitnami    https://charts.bitnami.com/bitnami       
helm repo add  incubator  https://kubernetes-charts-incubator.storage.googleapis.com       
helm repo add  stable     https://kubernetes-charts.storage.googleapis.com       
# 添加国内仓库       
helm repo add stable http://mirror.azure.cn/kubernetes/charts       
helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts       
helm repo update       
helm repo list       

 有时我不想用helm部署,因为其他的集群可能没有装helm,那么我就可以把helm组装的yaml输出未yaml文件,然后就可以在没有装helm的集群中用了:

helm install --dry-run --debug --version=0.2.0 --generate-name --set migStrategy=${MIG_STRATEGY} nvgfd/gpu-feature-discovery >gpu-feature-dicovery.yaml

 

posted on 2022-05-25 16:25  MissSimple  阅读(116)  评论(0编辑  收藏  举报

导航