当前位置: 首页 > news >正文 企业做网站公司怎么做深圳网站制作公司兴田德润官网多少 news 2025/10/30 22:16:25 企业做网站公司怎么做,深圳网站制作公司兴田德润官网多少,dedecms学校网站模板,施工企业安全形势分析会Helm 什么是 Helm 安装 Helm 重要概念 使用 Helm 1 简介 官网地址: Helm Helm是一个Kubernetes应用程序包管理工具#xff0c;它允许你轻松管理和部署Kubernetes应用程序。Helm通过使用称为Charts的预定义模板来简化Kubernetes应用程序的部署和管理。Chart包含了一组Ku… Helm 什么是 Helm 安装 Helm 重要概念 使用 Helm 1 简介 官网地址: Helm Helm是一个Kubernetes应用程序包管理工具它允许你轻松管理和部署Kubernetes应用程序。Helm通过使用称为Charts的预定义模板来简化Kubernetes应用程序的部署和管理。Chart包含了一组Kubernetes对象定义可以描述一个应用程序的完整部署和资源需求包括Deployment、Service、ConfigMap、Secret等。使用Helm你可以轻松地安装、升级、卸载和回滚Kubernetes应用程序。 同时Helm还提供了一些便捷的功能如依赖管理、全局变量、条件渲染等可以帮助你更好地管理应用程序的部署。Helm有两个主要的组件Helm客户端helm和Helm服务器Tiller。Helm客户端可以在本地运行而Tiller则运行在Kubernetes集群中并负责将Charts转换为Kubernetes对象。 2 安装 下载地址: Releases · helm/helm · GitHub 每个Helm 版本都提供了各种操作系统的二进制版本这些版本可以手动下载和安装。 下载 需要的版本 解压(tar -zxvf helm-v3.0.0-linux-amd64.tar.gz) 在解压目录中找到helm程序移动到需要的目录中(mv linux-amd64/helm /usr/local/bin/helm) 添加仓库: helm repo add bitnami https://charts.bitnami.com/bitnami 验证安装: helm help. 3 重要概念 Chart 代表着 Helm 包。它包含在 Kubernetes 集群内部运行应用程序工具或服务所需的所有资源定义。你可以把它看作是 Homebrew formulaApt dpkg或 Yum RPM 在Kubernetes 中的等价物。 Repository仓库 是用来存放和共享 charts 的地方。它就像 Perl 的 CPAN 档案库网络 或是 Fedora 的 软件包仓库只不过它是供 Kubernetes 包所使用的。 Release 是运行在 Kubernetes 集群中的 chart 的实例。一个 chart 通常可以在同一个集群中安装多次。每一次安装都会创建一个新的 release。以 MySQL chart为例如果你想在你的集群中运行两个数据库你可以安装该chart两次。每一个数据库都会拥有它自己的 release 和 release name。 4 使用 4.1 搜索 charts Helm 自带一个强大的搜索命令可以用来从两种来源中进行搜索 helm search hub 从 Artifact Hub 中查找并列出 helm charts。 Artifact Hub中存放了大量不同的仓库。 helm search repo 从你添加使用 helm repo add到本地 helm 客户端中的仓库中进行查找。该命令基于本地数据进行搜索无需连接互联网。 4.2 安装 使用 helm install 命令来安装一个新的 helm 包。最简单的使用方法只需要传入两个参数你命名的release名字和你想安装的chart的名称。 [rootk8s-node1 ~]# helm install nginx bitnami/nginx NAME: nginx LAST DEPLOYED: Wed Apr 5 07:18:04 2023 NAMESPACE: kube-system STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: nginx CHART VERSION: 13.2.34 APP VERSION: 1.23.4 ** Please be patient while the chart is being deployed ** NGINX can be accessed through the following DNS name from within your cluster: nginx.kube-system.svc.cluster.local (port 80) To access NGINX from outside the cluster, follow the steps below: 1. Get the NGINX URL by running these commands: NOTE: It may take a few minutes for the LoadBalancer IP to be available.Watch the status with: kubectl get svc --namespace kube-system -w nginx export SERVICE_PORT$(kubectl get --namespace kube-system -o jsonpath{.spec.ports[0].port} services nginx)export SERVICE_IP$(kubectl get svc --namespace kube-system nginx -o jsonpath{.status.loadBalancer.ingress[0].ip})echo http://${SERVICE_IP}:${SERVICE_PORT} 注意: 安装chart时创建了一个新的 release 对象。上述发布被命名为 nginx。 如果想让Helm生成一个名称删除发布名称并使用--generate-name。 helm 安装顺序: Helm | 使用Helm 4.3 查看列表 你可以通过 helm list 命令看到当前部署的所有 release [rootk8s-node1 ~]# helm list NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION nginx kube-system 1 2023-04-05 07:34:48.421708425 -0400 EDT deployed nginx-13.2.34 1.23.4 4.3 查看状态 你可以使用 helm status 来追踪 release 的状态或是重新读取配置信息 [rootk8s-node1 ~]# helm status nginx NAME: nginx LAST DEPLOYED: Wed Apr 5 07:18:04 2023 NAMESPACE: kube-system STATUS: deployed REVISION: 1 TEST SUITE: None NOTES: CHART NAME: nginx CHART VERSION: 13.2.34 APP VERSION: 1.23.4 ** Please be patient while the chart is being deployed ** NGINX can be accessed through the following DNS name from within your cluster: nginx.kube-system.svc.cluster.local (port 80) To access NGINX from outside the cluster, follow the steps below: 1. Get the NGINX URL by running these commands: NOTE: It may take a few minutes for the LoadBalancer IP to be available.Watch the status with: kubectl get svc --namespace kube-system -w nginx export SERVICE_PORT$(kubectl get --namespace kube-system -o jsonpath{.spec.ports[0].port} services nginx)export SERVICE_IP$(kubectl get svc --namespace kube-system nginx -o jsonpath{.status.loadBalancer.ingress[0].ip})echo http://${SERVICE_IP}:${SERVICE_PORT} 4.4 卸载 [rootk8s-node1 ~]# helm uninstall nginx release nginx uninstalled 5 安装自定义 Chart 上述安装方式只会使用 chart 的默认配置选项。很多时候我们需要自定义 chart 来指定我们想要的配置。 5.1 拉取自定义的 chart [rootk8s-node1 ~]# helm create app 注意: 当前目录中会出现一个 nginx-xxx.tgz 文件 这个文件就是 charts 的包。 5.2 查看 chart 目录结构 app/Chart.yamlvalues.yamlcharts/templates/... templates/ 目录包括了模板文件。当Helm评估chart时会通过模板渲染引擎将所有文件发送到templates/目录中。 然后收集模板的结果并发送给Kubernetes。 values.yaml 文件也导入到了模板。这个文件包含了chart的 默认值 。这些值会在用户执行helm install 或 helm upgrade时被覆盖。 Chart.yaml 文件包含了该chart的描述。你可以从模板中访问它。charts/目录 可以 包含其他的chart(称之为 子chart)。 5.3 自定义模板 $ rm -rf mychart/templates/* 编写 namespace.yaml apiVersion: v1 kind: Namespace metadata:name: {{ .Chart.Name }}namespace: {{ .Values.namespace }} 编写 deployment.yml apiVersion: apps/v1 kind: Deployment metadata:name: {{ .Chart.Name}}namespace: {{.Values.namespace}}labels:app: {{ .Chart.Name}} spec:replicas: {{ .Values.replicas }}template:metadata:name: {{ .Chart.Name}}labels:app: {{ .Chart.Name}}spec:containers:- name: {{ .Chart.Name}}image: {{ .Values.image}}imagePullPolicy: {{.Values.imagePullPolicy}}ports:- containerPort: {{.Values.containerPort}}restartPolicy: {{ .Values.restartPolicy }}selector:matchLabels:app: {{ .Chart.Name}} 编写 service.yml apiVersion: v1 kind: Service metadata:name: {{.Chart.Name}}namespace: {{.Values.namespace}} spec:selector:app: {{.Chart.Name}}ports:- port: {{.Values.service.port}}targetPort: {{.Values.containerPort}}type: {{ .Values.service.type }} 编写 Chart.yml apiVersion: v2 name: app description: A Helm chart for Kubernetes # A chart can be either an application or a library chart. # # Application charts are a collection of templates that can be packaged into versioned archives # to be deployed. # # Library charts provide useful utilities or functions for the chart developer. Theyre included as # a dependency of application charts to inject those utilities and functions into the rendering # pipeline. Library charts do not define any templates and therefore cannot be deployed. type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. appVersion: 1.16.0 编写 values.yaml replicas: 1 namespace: app image: nginx:1.19 imagePullPolicy: IfNotPresent restartPolicy: Always containerPort: 80 service:port: 80type: ClusterIP 5.4 验证是否存在错误 $ helm lint app 5.5 打包自定义 chart $ helm package app 5.6 安装 chart $ helm install app myapp-1.tgz 文章转载自: http://www.morning.qnjcx.cn.gov.cn.qnjcx.cn http://www.morning.bszmy.cn.gov.cn.bszmy.cn http://www.morning.xwbwm.cn.gov.cn.xwbwm.cn http://www.morning.c7625.cn.gov.cn.c7625.cn http://www.morning.qflcb.cn.gov.cn.qflcb.cn http://www.morning.rbhcx.cn.gov.cn.rbhcx.cn http://www.morning.ntqlz.cn.gov.cn.ntqlz.cn http://www.morning.bndkf.cn.gov.cn.bndkf.cn http://www.morning.lczxm.cn.gov.cn.lczxm.cn http://www.morning.mwmtk.cn.gov.cn.mwmtk.cn http://www.morning.ljxps.cn.gov.cn.ljxps.cn http://www.morning.kmjbs.cn.gov.cn.kmjbs.cn http://www.morning.nfccq.cn.gov.cn.nfccq.cn http://www.morning.cdlewan.com.gov.cn.cdlewan.com http://www.morning.kklwz.cn.gov.cn.kklwz.cn http://www.morning.sgrwd.cn.gov.cn.sgrwd.cn http://www.morning.ytbr.cn.gov.cn.ytbr.cn http://www.morning.cbndj.cn.gov.cn.cbndj.cn http://www.morning.dpbgw.cn.gov.cn.dpbgw.cn http://www.morning.pfbx.cn.gov.cn.pfbx.cn http://www.morning.ghfrb.cn.gov.cn.ghfrb.cn http://www.morning.kbfzp.cn.gov.cn.kbfzp.cn http://www.morning.rshs.cn.gov.cn.rshs.cn http://www.morning.ktcrr.cn.gov.cn.ktcrr.cn http://www.morning.xpfwr.cn.gov.cn.xpfwr.cn http://www.morning.dhqzc.cn.gov.cn.dhqzc.cn http://www.morning.wddmr.cn.gov.cn.wddmr.cn http://www.morning.sgnxl.cn.gov.cn.sgnxl.cn http://www.morning.ndxrm.cn.gov.cn.ndxrm.cn http://www.morning.lpskm.cn.gov.cn.lpskm.cn http://www.morning.hnpkr.cn.gov.cn.hnpkr.cn http://www.morning.rkfgx.cn.gov.cn.rkfgx.cn http://www.morning.wynqg.cn.gov.cn.wynqg.cn http://www.morning.rdng.cn.gov.cn.rdng.cn http://www.morning.yqkmd.cn.gov.cn.yqkmd.cn http://www.morning.rqrxh.cn.gov.cn.rqrxh.cn http://www.morning.yrycb.cn.gov.cn.yrycb.cn http://www.morning.qwwhs.cn.gov.cn.qwwhs.cn http://www.morning.bmncq.cn.gov.cn.bmncq.cn http://www.morning.hryhq.cn.gov.cn.hryhq.cn http://www.morning.fkmqg.cn.gov.cn.fkmqg.cn http://www.morning.qnksk.cn.gov.cn.qnksk.cn http://www.morning.fwqgy.cn.gov.cn.fwqgy.cn http://www.morning.rqdx.cn.gov.cn.rqdx.cn http://www.morning.xqqcq.cn.gov.cn.xqqcq.cn http://www.morning.snrhg.cn.gov.cn.snrhg.cn http://www.morning.hlmkx.cn.gov.cn.hlmkx.cn http://www.morning.xmxbm.cn.gov.cn.xmxbm.cn http://www.morning.ywtbk.cn.gov.cn.ywtbk.cn http://www.morning.pqkrh.cn.gov.cn.pqkrh.cn http://www.morning.znrlg.cn.gov.cn.znrlg.cn http://www.morning.kdtdh.cn.gov.cn.kdtdh.cn http://www.morning.jcbjy.cn.gov.cn.jcbjy.cn http://www.morning.spghj.cn.gov.cn.spghj.cn http://www.morning.rhfh.cn.gov.cn.rhfh.cn http://www.morning.tgcw.cn.gov.cn.tgcw.cn http://www.morning.zqwp.cn.gov.cn.zqwp.cn http://www.morning.ahlart.com.gov.cn.ahlart.com http://www.morning.snmth.cn.gov.cn.snmth.cn http://www.morning.bnzjx.cn.gov.cn.bnzjx.cn http://www.morning.shinezoneserver.com.gov.cn.shinezoneserver.com http://www.morning.rmkyb.cn.gov.cn.rmkyb.cn http://www.morning.xqzrg.cn.gov.cn.xqzrg.cn http://www.morning.skbbt.cn.gov.cn.skbbt.cn http://www.morning.gkmwk.cn.gov.cn.gkmwk.cn http://www.morning.lnbyk.cn.gov.cn.lnbyk.cn http://www.morning.kyflr.cn.gov.cn.kyflr.cn http://www.morning.pmtky.cn.gov.cn.pmtky.cn http://www.morning.svrud.cn.gov.cn.svrud.cn http://www.morning.bnlsd.cn.gov.cn.bnlsd.cn http://www.morning.hbjqn.cn.gov.cn.hbjqn.cn http://www.morning.plfrk.cn.gov.cn.plfrk.cn http://www.morning.dblfl.cn.gov.cn.dblfl.cn http://www.morning.wbxr.cn.gov.cn.wbxr.cn http://www.morning.sftpg.cn.gov.cn.sftpg.cn http://www.morning.mwmtk.cn.gov.cn.mwmtk.cn http://www.morning.rmppf.cn.gov.cn.rmppf.cn http://www.morning.lxkhx.cn.gov.cn.lxkhx.cn http://www.morning.zdqsc.cn.gov.cn.zdqsc.cn http://www.morning.jcrlx.cn.gov.cn.jcrlx.cn 查看全文 http://www.tj-hxxt.cn/news/263490.html 相关文章: 免费建站自己的网址怎么自己做网站表白 网站开发制作培训学校flash 网站开发教程 给公众号做头像的网站aso优化 相城专业的网站建设江苏省住房和城乡建设厅假网站 深圳公司网站设计企业成都隆昌网站建设 一些房产网站是怎么做的网络规划设计师改版时间 自己建的网站搜不到品质好的网站制作 玉树营销网站建设公司汉中做网站公司 阿里云模板建站教程免费建设小学校网站 dw是做网站的软件吗58同城上海网站建设 网站建设公司走进深圳易百讯河北省建设工程招标网 无锡网站设计网站北京建站优化公司 移动网站自助制作企业网站php 可以免费做网站推广的平台镇江关键字优化公司 做词云图的网站建设宣传网站的必要性 济南网站备案流程做微博推广的网站吗 网站建设专家排名广州美容网站建设 私人定制平台网站茂名网站制作网页 甘孜州手机网站建设wordpress相对路径 营销型网站案例易网拓建筑网站推荐 微网站建设加盟wordpress怎么增加语言 设计吧 网站做网站是干什么用的 公司网站设计哪家好seo网页优化工具 拉一条宽带要多少钱aso应用优化 浙江网站建设而wap手机建站平台 php无法调用wordpress网站排名优化技巧 网站后台管理页面下载网站建设开发技术类型 网站企业优化网址搭建wordpress 婚纱网站源码胡芦娃app软件下载网站 网站建设工作室简介山东省住房建设部网站首页