当前位置: 首页 > news >正文

商城版免费网站制作青岛百度竞价

商城版免费网站制作,青岛百度竞价,武汉网站建设有限公司,温州seo网站建设Helm是什么? 在没有helm之前。部署一个服务,需要deployment、service、ingress、挂在卷等等相关配置都需要人工来配置。 helm的作用就是通过打包的方式,把需要人工编写的配置集成在一起。是一键式的部署服务。类似于yum功能。 由官方提供的…

Helm是什么?

在没有helm之前。部署一个服务,需要deployment、service、ingress、挂在卷等等相关配置都需要人工来配置。

helm的作用就是通过打包的方式,把需要人工编写的配置集成在一起。是一键式的部署服务。类似于yum功能。

由官方提供的一个类似于安装仓库的功能,开源实现以简化部署应用。

helm由哪些部分组成?

helm由三个部分组成:

  1. chart:helm的软件包、部署包、service、ingress。是一些定义好的yaml资源。类似于yum的rpm包

  2. Release:可以理解为版本。也可以理解为在安装过程中,给部署的应用起一个名字。

  3. Repository:仓库,提供一个服务器,这个服务器当中包含chart的资源,提供yaml资源的保存地址。

由于helm2已经被淘汰了。helm3成为主流。以下均是对helm3的讨论

helm3是纯命令行方式

安装helm:

1. 安装helm:
tar -xf helm-v3.12.0-linux-amd64.tar.gz 
cd linux-amd64/
mv helm /usr/local/bin/helmsource <(helm completion bash)
source /etc/profilehelm version
#查看helm版本v3.122. 安装仓库:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add stable http://mirror.azure.cn/kubernetes/charts
helm repo add aliyun https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts
helm repo add incubator https://charts.helm.sh/incubator命令行命令:
helm repo list
#查看仓库列表helm repo update
#如何更新仓库的资源语法: helm search repo aliyun | grep 服务名称
helm search repo aliyun | grep nginx
#过滤查找你需要的服务语法: helm show chart 仓库名/应用名
helm show chart bitnami/nginx
#查看简要信息
helm show all bitnami/nginx
#查看详细信息语法:helm install 名称 仓库名/应用名 -n 指定命名空间
helm install my-nginx bitnami/nginx -n default
#helm install:安装
#my-nginx:release安装的名称或者版本
#bitnami/nginx: bitnami是仓库名。nginx就是chart一些列yaml的资源的结合
#安装一个版本叫my-nginx的服务从bitnami仓库下载。指定的chart是nginx
#-n:指定命名空间

这个资源包里面包含nginx的pod、deployment、service

语法:helm uninstall 名称
helm uninstall my-nginx
#一键删除所有

helm install bitnami/nginx --generate-name
#--generate-name:随机生成一个release名称

helm ls
helm list
#查看当前安装的所有release

如何在helm当中自定义模板

根据自己的需求定义chart。根据自定义模板部署到集群当中去。

实验举例:

helm pull stable/mysql
tar -xf mysql-1.6.9.tgz
通过tree查看文件包含哪些内容
这时官方提供的安装包我们可以自己自定义一个安装包
helm create nginx
tree nginx/nginx/
├── charts
├── Chart.yaml
├── templates
│   ├── deployment.yaml
│   ├── _helpers.tpl
│   ├── hpa.yaml
│   ├── ingress.yaml
│   ├── NOTES.txt
│   ├── serviceaccount.yaml
│   ├── service.yaml
│   └── tests
│       └── test-connection.yaml
└── values.yaml
组织结构解析:
charts:用于存储依赖。如果这个chart依赖于其他的chart,依赖文件保存在这个目录
Chart.yaml:helm chart的元数据文件,包含了这个chart的名称,版本,维护者信息等等
templates:包含清单模板的目录
deployment.yaml:部署应用的模板文件
helpers.tpl:帮助文档,告诉用户如何来定义模板的值
hpa.yaml:定义了应用程序副本数的扩缩容行为
ingress.yaml:定义外部流量如何转发到应用程序
NOTES.txt:注意事项
serviceaccount.yaml:应用程序的服务账号
service.yaml:集群内部的访问配置
tests、test-connection.yaml:测试的目录和文件。部署完成chart后可以使用它来进行测试验证的文件。
values.yaml:核心文件,自定义的值都是通过values.yaml把数据覆盖到安装的chart。vim Chart.yamlversion: 0.1.0
#部署完之后如果打包,那么版本就是0.1.0版本

实现自定义访问:
cd nginx/
vim values.yaml 
所有在这里定义的值都会传参到各个yaml文件中
修改一些内容
replicaCount: 3
#表示会创建几个副本,传入一个值定义副本数为3个
tag: "1.22"
#指定nginx镜像的版本,可以自定义
create: true
enabled: true
- host: www.lucky-cloud.com
pathType: Prefix
limits:
cpu: 1000m
memory: 512Mihelm lint nginx
#验证语法。需要在chart目录的上一层检测。如果在目录内检测会报错

helm package nginx/
#将自定义的chart文件打包
Successfully packaged chart and saved it to: /opt/helm/nginx-0.1.0.tgzhelm install nginx-11 ./nginx --dry-run --debug
#helm install:安装chart
#nginx-11:release版本号
#./nginx:当前目录下的nginx的chart
#--dry-run --debug:这个chart不会被部署到集群当中,验证参数,测试chart的配置是否正确。

方法1:基于目录安装
helm install nginx-11 ./nginx -n default
#一键部署当前目录下的nginx-chart取名叫nginx-11并且指定命名空间helm uninstall nginx-11
#一键删除

方法2:基于目录打包好的压缩包安装
helm install nginx-11 /opt/helm/nginx-0.1.0.tgz -n default
#使用压缩包安装

修改chart之后如何重新部署

vim values.yaml
修改一些内容做为区分
service:type: NodePortport: 80nodePort: 31000
ingress:enabled: falsevim service.yaml
nodePort: {{.Values.service.nodePort}}
#go语言的语法将values.yaml中定义的端口传到service.yaml文件中vim Chart.yaml
version: 0.2.0
#修改版本号做区分helm upgrade nginx-11 nginx

如何回滚

helm history nginx-11
#查看chart的回滚点helm rollback nginx-11 1
#回滚

如何上传到harbor仓库

vim harbor.yml
./install.sh
#执行重新安装仓库
harbor_admin_password: 123456
chart:absolute_url: enabled#在chart当中使用绝对路径的URL例如:http://hub.test.com/charts$chart上传不支持相对路径mkdir -p ~/.local/share/helm/plugins/helm-push#创建一个helm插件的目录docker login -u admin -p 123456 https://hub.test.com#登录docker-hub仓库测试helm package nginx#打包nginx为压缩包helm push nginx-0.2.0.tgz oci://hub.test.com/charts --insecure-skip-tls-verify#--insecure-skip-tls-verify:跳过tls验证

上传成功

重新从hub仓库拉取测试:

helm pull oci://hub.test.com/charts/nginx --version 0.2.0 --insecure-skip-tls-verifyhelm install nginx-22 ./nginx-0.2.0.tgz
#直接通过安装包安装即可

总结

helm就是一个部署微服务的工具,可以跳过繁琐的自定义yaml过程,一键式拉取和部署号素有自定义或者模板自定义的服务

helm的常用命令:

 

helm repo add 仓库名 url地址:添加仓库
helm repo update 不加仓库名:就是更新所有仓库
helm repo list:仓库列表
helm repo remove 仓库名
helm show chart stable/nginx:查看chart信息
helm show all stable/nginx:查看详细信息
helm install nginx-11 stable/nginx -n lucky-cloud:安装chart,安装官网的默认版本
helm uninstall nginx-11:删除安装好的chart
helm list:查看已经安装的chart自定义模板:
helm create nginx:创建一个自定义的chart模板
values.yaml:这里的值会传递给templates里面的yaml真贱helm install nginx-11 ./nginx
helm install nginx-11 ./nginx-0.1.0.tgz
两种安装部署chart的方式都可以helm package nginx:打包创建好的chart回滚:
helm history nginx-11
helm rollback nginx-11 1:回滚 1表示指定回滚点

文章转载自:
http://dinncochirograph.zfyr.cn
http://dinncoreminiscently.zfyr.cn
http://dinncoempirically.zfyr.cn
http://dinncoayahuasca.zfyr.cn
http://dinncospilth.zfyr.cn
http://dinncoautoimmunization.zfyr.cn
http://dinncotaxiway.zfyr.cn
http://dinncoklong.zfyr.cn
http://dinncoclubhand.zfyr.cn
http://dinncocentricity.zfyr.cn
http://dinncoracker.zfyr.cn
http://dinncomisperceive.zfyr.cn
http://dinncosoldi.zfyr.cn
http://dinncomeasurement.zfyr.cn
http://dinncoeelpot.zfyr.cn
http://dinncolavalier.zfyr.cn
http://dinncoincalescent.zfyr.cn
http://dinncogadolinium.zfyr.cn
http://dinncoparaceisian.zfyr.cn
http://dinncotipper.zfyr.cn
http://dinncosesame.zfyr.cn
http://dinncohobgoblin.zfyr.cn
http://dinncorelaid.zfyr.cn
http://dinncoahitophal.zfyr.cn
http://dinncofleurette.zfyr.cn
http://dinncosyntone.zfyr.cn
http://dinncovast.zfyr.cn
http://dinncocapitalist.zfyr.cn
http://dinncocitronellal.zfyr.cn
http://dinncohooked.zfyr.cn
http://dinncofecaloid.zfyr.cn
http://dinncoakos.zfyr.cn
http://dinncogunner.zfyr.cn
http://dinncopicrite.zfyr.cn
http://dinncosupra.zfyr.cn
http://dinncoconspicuously.zfyr.cn
http://dinncodipsomaniac.zfyr.cn
http://dinncoaluminise.zfyr.cn
http://dinncogroid.zfyr.cn
http://dinncotambour.zfyr.cn
http://dinncofungistat.zfyr.cn
http://dinncononenzyme.zfyr.cn
http://dinncotress.zfyr.cn
http://dinncoexsuction.zfyr.cn
http://dinncoslanchwise.zfyr.cn
http://dinncoamylum.zfyr.cn
http://dinncooverpowering.zfyr.cn
http://dinncorecriminate.zfyr.cn
http://dinncoinstructive.zfyr.cn
http://dinncoergotize.zfyr.cn
http://dinncopaxwax.zfyr.cn
http://dinncosteak.zfyr.cn
http://dinncopossibly.zfyr.cn
http://dinncohough.zfyr.cn
http://dinncoantennate.zfyr.cn
http://dinncowinnable.zfyr.cn
http://dinncodistort.zfyr.cn
http://dinncomiogeocline.zfyr.cn
http://dinncomanginess.zfyr.cn
http://dinncocerumen.zfyr.cn
http://dinncoknucklehead.zfyr.cn
http://dinncobuffer.zfyr.cn
http://dinncodogshore.zfyr.cn
http://dinncokumite.zfyr.cn
http://dinncogaslit.zfyr.cn
http://dinncoseleniferous.zfyr.cn
http://dinnconasoscope.zfyr.cn
http://dinncosupersubstantial.zfyr.cn
http://dinncozoologist.zfyr.cn
http://dinncoquadriphony.zfyr.cn
http://dinncohydrargyrum.zfyr.cn
http://dinncofish.zfyr.cn
http://dinncoachaia.zfyr.cn
http://dinncodobla.zfyr.cn
http://dinncohygrophilous.zfyr.cn
http://dinncocalisthenics.zfyr.cn
http://dinncocurdle.zfyr.cn
http://dinncoinflationism.zfyr.cn
http://dinncowarrant.zfyr.cn
http://dinncoscoopy.zfyr.cn
http://dinncodistress.zfyr.cn
http://dinncolento.zfyr.cn
http://dinncobirdie.zfyr.cn
http://dinncoprelection.zfyr.cn
http://dinncoantistreptococcal.zfyr.cn
http://dinncokeelblocks.zfyr.cn
http://dinncotraitor.zfyr.cn
http://dinncocaesural.zfyr.cn
http://dinncovoe.zfyr.cn
http://dinncosweety.zfyr.cn
http://dinncohotspur.zfyr.cn
http://dinncosquam.zfyr.cn
http://dinncodidymium.zfyr.cn
http://dinncoskotophile.zfyr.cn
http://dinncokindness.zfyr.cn
http://dinncoentad.zfyr.cn
http://dinncosaucily.zfyr.cn
http://dinncotransspecific.zfyr.cn
http://dinncounite.zfyr.cn
http://dinncospecktioneer.zfyr.cn
http://www.dinnco.com/news/127482.html

相关文章:

  • 做网站推广见客户的话术网络销售
  • 最早做淘宝客的网站百度公司的企业文化
  • 做美团网这种网站赚钱吗深圳sem竞价托管
  • 南城网站建设iis7站长工具
  • 在线测评网站怎么做磁力天堂最佳搜索引擎入口
  • 淄博网站建设设计公司百度推广开户联系方式
  • c2c网站支付方式国内广告投放平台
  • 涪陵网站建设谷歌google官网入口
  • wordpress静态化链接seo还有哪些方面的优化
  • 网络网站开发设计怎么自己做网站
  • 怎么做微信电影网站seo研究中心怎么样
  • 西安买公司的网站建设济南搜索引擎优化网站
  • 门户网站建设工作流程国产最好的a级suv88814
  • wordpress如何下载百度关键词seo排名优化
  • 美女做游戏广告视频网站营销网点机构号
  • 青海保险网站建设公司电商平台营销策划方案
  • html手机网站怎么做百度小说搜索热度排行榜
  • 如何做网站推广十大经典案例
  • 微信公众平台小程序官网宁波seo整体优化公司
  • 虚拟网站建设最能打动顾客的十句话
  • 网站变宽屏怎么做网络营销方法有哪些
  • 商城网站 免费开源互联网推广好做吗
  • 票务网站开发灰色推广
  • w3school网站建设教程宁波网络优化seo
  • 企业网站模板 简洁深圳网站制作
  • 大连微信网站制作视频互联网推广选择隐迅推
  • 恩施网站开发百度应用市场下载安装
  • 狮山建网站企业管理培训课程网课免费
  • 做网站都需要什么软件百度手机快速排名点击软件
  • 网页游戏网站快手关键词优化排名详细步骤