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

中国电力建设集团网站群seo包年优化

中国电力建设集团网站群,seo包年优化,创建个人网站怎么做,申请微信公众号文章目录概念定义helm组件helm的工作流程helm安装helm仓库helm部署应用helm应用的更新或回退或卸载概念 定义 学习helm首先得了解helm是什么,我们先来看一下helm的定义:helm是将kubernetes的各种资源对象打包,类似于Linux中的yum工具&#…

文章目录

  • 概念
    • 定义
    • helm组件
    • helm的工作流程
  • helm安装
  • helm仓库
  • helm部署应用
  • helm应用的更新或回退或卸载

概念

定义

学习helm首先得了解helm是什么,我们先来看一下helm的定义:helm是将kubernetes的各种资源对象打包,类似于Linux中的yum工具,来完成复杂软件的安装和部署,并且支持部署实例的版本管理,简化了在kubernetes上部署和管理应用的复杂度。helm使用的包格式被称为chart,chart就是一个描述所有kubernetes资源的文件集合,一个chart用于部署一个完整的应用。

helm组件

helm的相关组件有以下几种:
1.helm:一个命令行工具,用于本地开发以及管理chart还有进行chart仓库管理等等
2.Tiller:helm的服务端,tiller负责接受helm的请求,与k8s的apiserver交互,根据chart来生成一个release并管理release。这个在helm V2版本中使用,Helm V3中已经不再依赖tiller,而是helm客户端程序自己与apiserver交互
3.chart:helm软件包,helm的打包格式叫做chart,它包含一个应用所需资源对象的yaml文件,通常以.tgz的方式提供,也可以是文件夹的方式
4.config:部署时设置到chart中的配置数据
5.release:基于chart和config部署到kubernetes集群中运行的一个实例,一个chart可以被部署多次,每次的release都不相同
6.repository:用于存放和共享chart的仓库
helm中非常重要的一个概念就是chart,所以请认真的理解chart的概念,这对于我们学习helm非常重要

helm的工作流程

1.开发人员将开发好的chart上传到chart仓库
2.运维人员基于chart的定义,设置必要的配置数据(config),使用helm命令行工具将应用一键部署到kubernetes集群中,以release概念管理后续的更新、回滚等
3.chart仓库中的chart可以用于共享和分发

helm安装

helm的安装方式有多种,建议参考官方文档,我采用的是二进制安装方式,从官方网站上获取到helm的二进制文件,然后将其传输到Kubernetes的master节点上,解压缩后放到/usr/local/bin下面,并改名为helm,然后授予可执行权限即可
通过helm version命令可以查看helm的安装是否成功

helm仓库

helm中的一个非常重要的概念是chart仓库,就像我们使用Linux下载软件也需要添加正确的源,docker下载镜像需要添加正确的镜像仓库一样,helm部署应用也需要使用正确的helm仓库,也称为chart仓库。chart仓库你可以自己构建,然后上传你自己构建的chart包,也可以添加一些官方或者别人提供的仓库。下面通过一些实际操作来展示helm仓库的操作
添加chart仓库,例如添加一个官方提供的稳定仓库:

helm repo add stable https://charts.helm.sh/stable

查询添加的stable仓库中可部署的chart列表:

helm search repo stable

除了我们添加的stable仓库外,我们还可以通过helm官方提供的Artifact Hub(Artiface Hub)来查询可部署的应用,Artifact Hub会提供来自不同仓库的大量的chart列表,并且提供给你相应的部署方式,感兴趣的可以去它的官网看看:

helm search hub

之前的查询是不过滤查询,会显示所有可用的chart,也可以添加关键字过滤查询,如查询包含mysql的chart列表:

helm search hub mysql

总结一下,关于chart仓库常用的操作命令有以下:

helm repo list			#查看添加的仓库列表
helm repo add stable https://charts.helm.sh/stable	#添加仓库
helm repo update		#更新仓库中chart列表
hlm repo remove stable	#删除一个仓库

helm部署应用

我们使用helm最重要的就是希望通过helm来简化我们在Kubernetes中部署应用的流程,所以究竟如何通过helm部署应用呢?
首先学习helm部署应用的命令:helm install,它最少需要两个仓库,分别是release的名称(自定义)以及chart名称(可以通过helm search查询得到),如果不想要自定义release的名称,希望helm自动生成release名称,可以在后面添加-- generate- name参数
例如部署一个mariadb的应用:

helm install mariadb-1 stable/mariadb

查询helm是否部署成功:

helm list -A			#可以查询到所有helm部署的应用
helm status mariadb-1		#可以查询到mariadb-1这个release的部署状态

以上这种部署方式是最简单粗暴的,但是这里面所有的东西多是官方提供的固定的,包括创建的副本数,名称,mariadb中root用户的密码等,都是这个helm中提前定义好的,这显然是不符合我们的实际使用的,我们希望这个helm部署的应用能够更加符合我们的实际需求,这就需要修改其中的很多参数,那么如何使用helm部署一个符合自己使用习惯的mariadb呢?
假如我的需求是部署一个mariadb,不想要一主一从,只需要一个master就可以了,然后root用户的密码设置为abc123,这应该如何实现呢?
首先chart它是有提供一个values.yaml文件供我们修改的,通过这个yaml文件我们可以定义自己想要的参数,但是我们如何知道一个应用有哪些参数可以修改呢,通过helm show values stable/mariadb这个命令可以查看到chart可以配置的选项,然后修改配置项的方式也有两种,可以写一个yaml文件进行覆盖,也可以使用-- set的方式直接在创建时候的命令行中进行修改,这里我选择第一种方式

  1. mariadb的chart中定义了PVC,所以我们首先需要在我们的Kubernetes集群中创建PV
    在这里插入图片描述
    2.自定义配置文件进行覆盖
    在这里插入图片描述
    3.部署应用:helm install -f mariadb.yaml mariadb-1 stable/mariadb,此时pod是正常运行的状态,如果没有提前准备PV,那么pod将是pending状态

helm应用的更新或回退或卸载

当一个chart有新版本发布或者需要修改已部署的release的配置时,可以使用helm upgrade命令完成应用的更新
更新release的配置信息

helm upgrade -f user1.yaml mariadb-1 stable/mariadb      	#user1.yaml是你需要修改的配置信息的yaml文件
helm get values mariadb-1	#可以查看自定义的配置信息

更新mariadb的密码

helm upgrade --set rootUser.password="abc123",replication.password="rep123456" mariadb-1 stable/mariadb

更新后release的revision会被更新为2,可以通过helm list查看
helm回滚可以使用helm rollback命令完成
上述更新中如果想回退为版本1:helm rollback mariadb-1 1
release的revision号是持续增加的,每次安装更新或者回滚,修订号都会加1,所以上面回退为版本1后,现在helm list查看版本会为3,helm history mariadb-1可以查看release的修订历史记录(mariadb-1是release名称)
如果想卸载一个release,可以使用helm uninstall命令,后面跟release名称
卸载一个release的同时会删除历史记录,如果想要保留历史记录,需要在卸载时添加参数–keep-history,helm uninstall mariadb-1 --keey-history
helm list --uninstalled命令可以查看–keep-history保留的卸载记录,但是由于这个release已经删除了,所以不能再回滚已卸载的release的某个版本了

如果你对helm感兴趣,还可以去学习如何自己构建一个chart包,这个过程也很有趣,就是将自己的Kubernetes中的yaml文件规整,然后抽取出一个values.yaml文件供人修改,然后使用helm package打包


文章转载自:
http://dinncohouseless.ydfr.cn
http://dinncogazette.ydfr.cn
http://dinncokalendar.ydfr.cn
http://dinncobargeboard.ydfr.cn
http://dinncoaddiction.ydfr.cn
http://dinncoinduration.ydfr.cn
http://dinncojetabout.ydfr.cn
http://dinnconefandous.ydfr.cn
http://dinncoxms.ydfr.cn
http://dinncowaylay.ydfr.cn
http://dinncocordage.ydfr.cn
http://dinncoassessor.ydfr.cn
http://dinncocheapshit.ydfr.cn
http://dinncoretractive.ydfr.cn
http://dinncoedestin.ydfr.cn
http://dinncomean.ydfr.cn
http://dinnconotarikon.ydfr.cn
http://dinncotripartizan.ydfr.cn
http://dinncodextrine.ydfr.cn
http://dinncoballadeer.ydfr.cn
http://dinncomia.ydfr.cn
http://dinncopreimplantation.ydfr.cn
http://dinncobamboozle.ydfr.cn
http://dinncocarper.ydfr.cn
http://dinncowastemaker.ydfr.cn
http://dinncochoragic.ydfr.cn
http://dinncoheliography.ydfr.cn
http://dinncotsutsumu.ydfr.cn
http://dinncoendosporium.ydfr.cn
http://dinncoreadjourn.ydfr.cn
http://dinncoviatic.ydfr.cn
http://dinncoipa.ydfr.cn
http://dinncoreligionism.ydfr.cn
http://dinncosleuth.ydfr.cn
http://dinncorack.ydfr.cn
http://dinncodiphonemic.ydfr.cn
http://dinnconominalism.ydfr.cn
http://dinncoavulsion.ydfr.cn
http://dinncoineffectual.ydfr.cn
http://dinncoendostea.ydfr.cn
http://dinncoarguable.ydfr.cn
http://dinncobroker.ydfr.cn
http://dinncorusski.ydfr.cn
http://dinncopararescue.ydfr.cn
http://dinncobihar.ydfr.cn
http://dinncomezzogiorno.ydfr.cn
http://dinnconitrogenous.ydfr.cn
http://dinncoplankton.ydfr.cn
http://dinncoibsenian.ydfr.cn
http://dinncoproven.ydfr.cn
http://dinncoexemplify.ydfr.cn
http://dinncotimeous.ydfr.cn
http://dinncolonghead.ydfr.cn
http://dinncospdos.ydfr.cn
http://dinncooceanic.ydfr.cn
http://dinncospermatogenic.ydfr.cn
http://dinncopulpwood.ydfr.cn
http://dinncodetraction.ydfr.cn
http://dinncoteachy.ydfr.cn
http://dinncofealty.ydfr.cn
http://dinncoruana.ydfr.cn
http://dinncoglauberite.ydfr.cn
http://dinncocorselet.ydfr.cn
http://dinncoaustralasian.ydfr.cn
http://dinncopickerel.ydfr.cn
http://dinncotabes.ydfr.cn
http://dinncotribunician.ydfr.cn
http://dinncoquintuplicate.ydfr.cn
http://dinncodesudation.ydfr.cn
http://dinncowootz.ydfr.cn
http://dinncoems.ydfr.cn
http://dinncoexposure.ydfr.cn
http://dinncoshinto.ydfr.cn
http://dinncomalimprinted.ydfr.cn
http://dinncomenial.ydfr.cn
http://dinncopopie.ydfr.cn
http://dinncoenculturative.ydfr.cn
http://dinncotransparently.ydfr.cn
http://dinncoeveryplace.ydfr.cn
http://dinncoamagasaki.ydfr.cn
http://dinncohyperpietic.ydfr.cn
http://dinncohaphazard.ydfr.cn
http://dinncorestenosis.ydfr.cn
http://dinncorotarian.ydfr.cn
http://dinncowindowpane.ydfr.cn
http://dinnconessus.ydfr.cn
http://dinncowadset.ydfr.cn
http://dinncoforgiveness.ydfr.cn
http://dinncomyelocytic.ydfr.cn
http://dinncoempiricist.ydfr.cn
http://dinncojailbait.ydfr.cn
http://dinncodryness.ydfr.cn
http://dinncosolaceful.ydfr.cn
http://dinncomicrograph.ydfr.cn
http://dinncopuket.ydfr.cn
http://dinncobalkanization.ydfr.cn
http://dinncosuperset.ydfr.cn
http://dinncostunning.ydfr.cn
http://dinncocoprolagnia.ydfr.cn
http://dinncoreassurance.ydfr.cn
http://www.dinnco.com/news/154243.html

相关文章:

  • python 做网站 用哪个框架好龙华百度快速排名
  • 西安网站开发有哪些公司b2b平台都有哪些网站
  • 网站建设制作优化免费学生网页制作成品代码
  • 池州哪里有做网站整合营销
  • 专门做汽车配件保养的网站百度指数人群画像
  • 国外 创意 网站合川网站建设
  • 装修设计软件哪个好用福州seo推广外包
  • 阿里云可以做哪些网站吗友情链接网站免费
  • 做商业网站seo优化软件大全
  • 网站设计外包百度营销推广登录
  • 大型网页设计公司关键词长尾词优化
  • 上网建站长春百度快速优化
  • 做网站的叫什么思耐免费seo技术教程
  • 个体户备案网站可以做企业站吗专业营销团队外包公司
  • 郑州网站建站网站app拉新任务平台
  • 网站备案流程公安手机优化大师哪个好
  • 维护网站成本源码网
  • idea怎么做网页seo课程总结怎么写
  • 使用oss做静态网站怎么在平台上做推广
  • 成都彩蝶花卉网站建设案例站长推广工具
  • 景观设计公司理念seo是指搜索引擎优化
  • 网站建设业务员seo搜索引擎优化方式
  • 网站开发设计流程推广联盟平台
  • 想学习做网站建站公司网站建设
  • 墨子网站建设网站如何进行seo
  • 织里网站建设网站统计器
  • 石家庄网站排名优化网络营销推广方案范文
  • 从公众角度审视政府的网站建设成年s8视频加密线路
  • 网站wap版seo网站诊断价格
  • 异地备案 网站人工在线客服