首页 > 其他分享 >helm3的安装使用

helm3的安装使用

时间:2023-03-22 14:59:22浏览次数:45  
标签:helm3 chart repo nginx nfs https 使用 helm 安装

转载自:https://www.jianshu.com/p/6907fc806b75

=========

 

1.Helm3安装(二进制安装)

# 根据操作系统跟所需版本去获取最新二进制安装包
https://github.com/helm/helm/releases     
wget https://get.helm.sh/helm-v3.3.1-linux-amd64.tar.gz      
tar xf helm-v3.3.1-linux-amd64.tar.gz
cp linux-amd64/helm  /usr/local/bin/
  • helm其他安装可参考官方网站: https://helm.sh/docs/intro/install/
  • 注意: helm 客户端需要下载到安装了 kubectl 并且能执行能正常通过 kubectl 操作 kubernetes 的服务器上, 否则 helm 将不可用

2.配置repo

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 http://mirror.azure.cn/kubernetes/charts       
helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts       

#更新repo仓库资源
helm repo update     

#查看添加的repo仓库  
helm repo list      

3.helm3 命令使用汇总

#查看环境信息
helm env

#查看版本信息
helm version

#查找软件
helm search repo nginx 
helm search hub  nginx 

#查看已有仓库列表
helm repo list

#更新仓库资源
helm repo update

#删除一个仓库
helm repo remove bitnami

#创建仓库索引
helm repo index /root/helm/repo

#部署chart
helm install  centos-nginx bitnami/nginx

-------------------------------------------------------------
#chart状态查看
helm status centos-nginx

简介
该命令显示已命名发布的状态,状态包括:

最后部署时间
发布版本所在的k8s命名空间
发布状态(可以是: unknown, deployed, uninstalled, superseded, failed, uninstalling, pending-install, pending-upgrade 或 pending-rollback)
发布版本修订
发布版本描述(可以是完成信息或错误信息,需要用–show-desc启用)
列举版本包含的资源,按类型排序
最后一次测试套件运行的详细信息(如果使用)
chart提供的额外的注释
-----------------------------------------------------------

#卸载chart
helm uninstall centos-nginx 

#查看chart列表    -A 表所有namespace
helm list -A

#chart部署记录
helm history centos-nginx

#chart更新
helm upgrade --set image.tag=nginx.18 centos-nginx bitnami/nginx

#chart回滚
helm rollback centos-nginx 1

3.1 chart制作命令

此部分包括了chart下载,和制作chart包相关命令

#下载chart包
helm pull bitnami/nginx

#检查chart包语法
helm lint 

#渲染模式测试chart包
helm install --debug --dry-run testchart .

#创建chart包
helm create testchart

#上传chart包到私服
helm push nginx-9.4.1.tgz chartmuseum --debug

3.2 chart 信息命令

chart在helm里面是一种资源集合,也是一种格式,在安装使用之前我们可以查看 相关的信息

#查看chart包信息,显示chart包的版本,源码等信息
helm show chart bitnami/nginx

3.3 release信息命令

release在helm的概念是已经部署了的chart(不包括k8s是否部署成功),此类命令在部署后排错用,因为此类命令显示的信息 其他命令也有实现,所有使用不多

#查看release 注释
helm get notes centos-nginx

#查看release 修改的值 (如果是install之后没修改过,就是null)
helm get values centos-nginx

#查看release 钩子
helm get hooks center-nginx

#查看manifest 配置文件,这个manifest配置文件就是kubernetes中资源配置文件,名称一样
helm get manifest centos-nginx

#查看release 所有信息,就是上面4个命令的值的聚合
helm get all centos-nginx

3.4 插件命令

#安装插件
helm plugin install https://github.com/chartmuseum/helm-push.git

#插件列表
helm plugin list

#卸载插件
helm plugin uninstall pluginName

#更新插件
helm plugin update pluginName

4.案例练习 helm安装 nfs storageclasses

# 1.安装nfs   
yum install nfs-utils rpcbind -y
systemctl  enable  nfs-server  rpcbind
echo "/data 10.0.0.0/24(rw,sync,no_root_squash)" >  /etc/exports 
systemctl  start  nfs-server rpcbind 

# 2.安装nfs storageclasses
helm pull stable/nfs-client-provisioner --untar
cd nfs-client-provisioner
vim values.yaml 
...
nfs:  server: 10.0.0.5
        path: /data/nfs 
        mountOptions:
...
helm install nfs -f values.yaml .

5.请参考下表来确定哪个版本的Helm与您的集群兼容。

Helm 版本支持的 Kubernetes 版本
3.8.x 1.23.x - 1.20.x
3.7.x 1.22.x - 1.19.x
3.6.x 1.21.x - 1.18.x
3.5.x 1.20.x - 1.17.x
3.4.x 1.19.x - 1.16.x
3.3.x 1.18.x - 1.15.x
3.2.x 1.18.x - 1.15.x
3.1.x 1.17.x - 1.14.x
3.0.x 1.16.x - 1.13.x
2.16.x 1.16.x - 1.15.x
2.15.x 1.15.x - 1.14.x
2.14.x 1.14.x - 1.13.x
2.13.x 1.13.x - 1.12.x
2.12.x 1.12.x - 1.11.x
2.11.x 1.11.x - 1.10.x
2.10.x 1.10.x - 1.9.x
2.9.x 1.10.x - 1.9.x
2.8.x 1.9.x - 1.8.x
2.7.x 1.8.x - 1.7.x
2.6.x 1.7.x - 1.6.x
2.5.x 1.6.x - 1.5.x
2.4.x 1.6.x - 1.5.x
2.3.x 1.5.x - 1.4.x
2.2.x 1.5.x - 1.4.x
2.1.x 1.5.x - 1.4.x
2.0.x 1.4.x - 1.3.x
   

标签:helm3,chart,repo,nginx,nfs,https,使用,helm,安装
From: https://www.cnblogs.com/hd92/p/17243911.html

相关文章

  • MacOS 安装Podman 替代Docker
    一、安装下载地址:https://github.com/containers/podman/blob/main/DOWNLOADS.md桌面版:https://podman-desktop.io/docs/getting-started/getting-started$brewinstal......
  • linux上安装Docker(非常简单的安装方法)
    最近比较有空,大四出来实习几个月了,作为实习狗的我,被叫去研究Docker了,汗汗! Docker的三大核心概念:镜像、容器、仓库镜像:类似虚拟机的镜像、用俗话说就是安装文件。容......
  • Costura.Fody 使用问题
    1.Costura.Fody引用后,未能正常合并资源文件。用着用着就不行了解决方案:在csproj所在的文件目录,找到FodyWeavers.xml,添加<Costura/>1<Weaversxmlns:xsi="http://www.......
  • SQL 分类及 mysql安装及卸载注意事项
    SQLstructuralquerylanguage分类DML数据操纵语言datamanipulationlanguageinsertupdatedeleteselectDDL数据定义语言datadefinitionlan......
  • 从零开始的Docker Desktop使用,Docker快速上手Docker介绍和基础使用
    从零开始的DockerDesktop使用,Docker快速上手Docker介绍和基础使用Docker简介和安装和基础配置Docker简介Docker就像一个盒子,里面可以装很多物件,如果需要某些物件......
  • Flume安装
    1、下载Flume版本为apache-flume-1.9.0-bin链接:https://pan.baidu.com/s/1dSJhZBb6Rz__WYNhM2HzkQ 提取码:12342、解压配置解压后,将conf目录下的flume-env.sh.templat......
  • [深入vue3之refs] ref、unref、toRef、toRefs、isRef、customRef、shallowRef、trigge
    ref接受一个内部值并返回一个响应式且可变的ref对象。ref对象仅有一个.valueproperty,指向该内部值。如果将对象分配为ref值,则它将被reactive函数处理为深层的......
  • Java 使用 POI 导出Excel,设置同一个单元格的内容显示不同的文字颜色
    要在Java中导出Excel并设置同一单元格的内容显示不同的文字颜色,可以使用ApachePOI库来实现。下面是一个示例代码,演示如何在单元格中设置不同颜色的文本:1//创建......
  • hadoop 安装
    deban安装hadoop文档1.使用的kvm创建的虚拟机,创建虚拟机的同时创建hadoop用户建议使用最简单的安装方式2.配置/etc/network/interfaces文件3.配置/etc/hosts文......
  • QT Creator 安装教程
    Qt介绍:  Qt是一个跨平台的C++开发库。主要用来绘制漂亮的界面,其他还包含很多其它功能,如多线程、访问数据库、图像处理、音频视频处理、网络通信、文件操作等。Qt......