当前位置:网站首页>Explain the kubernetes package management tool Helm
Explain the kubernetes package management tool Helm
2022-06-11 14:49:00 【Deep learning and python】
author | Ray Elenteny
translator | Winter rain
planning | Chu Xingjuan
When it comes to Helm when , We often make such an analogy :Helm To Kubernetes, It's like apt Based on debian The system of ,yum or rpm To be based on Red Hat It's the same system . In addition to package management ,Helm There is also a lot of built-in configuration management .
Helm Is aimed at Kubernetes A package management tool , At first, a family named Deis Developed by , It was later acquired by Microsoft . Microsoft fully supports Helm, Speed up its development , Now it is the cloud local computing foundation (CNCF) Part of .
picture source :“Helm history”——2018 year 5 month , stay CNCF TOC On Helm Project presentation slides
As CNCF Part of ,Helm It has been actively developed and supported by many organizations , And thus developed a large and active community . Here are Helm By 2021 year 10 Sample project contribution statistics for month :
Table source : China National Petroleum Fund Development Statistics project 《 Overall statistical table of the project 》
1 Why? Kubernetes A package manager is required ?
Most technologies are based on “Hello World” To introduce key concepts ,Kubernetes No exception . In addition to the simplest components , Deploy any component to Kubernetes Clusters need to coordinate across multiple components .
such as , management Kubernetes The process of application deployment outside the cluster is not complicated , However, due to the existence of dependencies and dependent versions 、 Configure workpiece 、 Pre - and post deployment steps 、 Validation etc. , This becomes a tedious task . just as apt and yum Is for Linux Managing the process is the same ,Helm by Kubernetes Deal with this process .
On the whole ,Helm Features have the following features :
- Kubernetes Manage the deployment lifecycle of components and Applications
- Template based definitions , Support for cross deployment environments ( for example , Development 、 Quality assurance 、 production ) Portability of
- The hook mechanism can inject use case specific code at different stages of the deployment lifecycle
- Deploy the test framework
2 Helm Structure
Use Helm Just install an executable .helm The order provides 20 Multiple parameters , Used to build 、 Deploy 、 Delete 、 Roll back, etc , Deploy application to Kubernetes In the cluster .
Helm Deployment artifacts are Helm Chart.Helm Chart Used by to deploy components or applications to Kubernetes The resource composition of the cluster .Chart The most common resource in is YAML file , It follows the standard Kubernetes Resource description . If you can use it skillfully kubectl create perhaps kubectl apply Command deployment to Kubernetes colony , Then you will feel Helm Chart Medium YAML The file looks familiar .Helm Chart Usually contains additional resources , Such as README file 、 Default parameter files and additional files required for deployment ( Such as certificates ).
Development Helm Chart You need to organize your files using a predefined directory structure . It can be used Helm command helm create Create a Helm chart, It is a predefined directory structure , Contains some sample files . Generated chart There are several YAML file . One Kubernetes Deployment usually requires multiple... To be deployed Kubernetes Resource description , in many instances , These deployments must have a priority order . When deploying manually , You must know the order . and Helm You don't have to , because Helm know Kubernetes Priority of resource description .
Helm A key feature of the deployment process is Chart Hooks. stay Helm Chart In the deployment lifecycle of ,Chart hook Is a mechanism for performing additional tasks .Helm The following points are supported to introduce the graph Chart Hook:
Table source :“ Useful hook ——Chart Hook”,Helm Chart Can depend on other Helm Chart
for example , An application may contain dependencies on a set of microservices , One of the micro services is provided by his own Helm Chart Definition . When the application is deployed ,Helm Will manage these dependencies . To be consistent with the microservice pattern , Each component can be updated independently of other components , So it is still the definition of a collection of cohesive applications .
3 planning Helm Deploy
Helm It can play a role in all aspects of application development and deployment , This requires close cooperation between the engineering and operations teams , To design solutions and answer deployment questions . Through team coordination , Deployment decisions can be made iteratively , To use a single deployment package to support the goals of each environment to accommodate the differences in each deployment environment .
In addition to the hook concept described above ,Helm It also provides a robust template mechanism , Enable teams to address the challenges of a single deployment package . Usually ,Helm Chart Medium YAML The document doesn't look like handwritten YAML Kubernetes Resource description .
contrary ,Helm Chart Medium YAML The file is used Helm Template language development :
{{- if .Values.ingress.enabled -}}
{{- $fullName := include "helm-demo.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "helm-demo.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}By the helm create Generated templated ingress Describe examples , Several variables are provided , Used to define and configure ingress resources , Include whether you should create ingress resources . Through templates ,Helm Provide for the right to Kubernetes Extensive control over how resources are deployed . A well planned template pattern can generate a single deployment package , send Helm Chart Be able to successfully deploy , Range from a single node on the developer workstation Kubernetes Cluster to production Kubernetes colony .
4 Helm Chart and CI/CD
Continuous integration as an organization / Continuous delivery of part of the pipeline ,Helm Play the role of facilitator and component . As a promoter , It becomes a cross - environment ( engineering 、 Quality assurance 、 deliver 、 authentication 、 Production etc. ) Mechanisms for deploying applications or components to enhance pipelines . stay CI/CD In the pipeline , Automated Helm Chart Deployment is very simple .
Helm Chart As an application component , It is also iteratively developed and deployed like application code . It means CI/CD The pipeline is verifying Helm Chart Itself is indispensable . in fact ,Helm Chart Should be considered part of the application code , Rather than being a peripheral part of the application development process —— It should even be Helm Chart As part of the application source code . Similar to the way an application builds a versioned container image and pushes it to the mirror registry ,helm package take chart Bind to versioned archive . The generated archive is submitted to Helm Chart The repository , It can be accessed from this repository for deployment .
The above figure highlights the phases in the application software development lifecycle . No matter which mode you use to manage Helm Chart Source code , It's in the app CI/CD The pipeline is as indispensable as the application itself .
5 Conclusion
Helm Has always been a Kubernetes Part of the ecosystem hype curve , With Kubernetes The hype curve began to flatten ,Helm And it's mature .Helm Is the method revolutionary ? Not entirely. .Helm With years of accumulated knowledge of software packages and configuration management tools , Now bring these experiences to Kubernetes. meanwhile ,Helm adopt Helm Chart The idea of defining deployment packages is important to the organization CI/CD The efficiency of the pipeline has a direct impact , The most significant are configuration patterns and deployment flexibility . Well designed Helm Chart Is an important part of effective delivery .
Link to the original text :
https://dzone.com/articles/kubernetes-package-management-with-helm?
边栏推荐
- 大道至简 | 设计 ViT 到底怎么配置Self-Attention才是最合理的?
- 理邦仪器软件实习生面试
- Is bone conduction earphone good for bone? Is bone conduction earphone harmful to the body?
- Current situation and future development trend of global and Chinese transcranial magnetic stimulation coil Market from 2022 to 2028
- Airtest automated test
- 数据库“百亿蓝海”中,每位玩家都能找到一叶扁舟 | C位面对面
- 英伟达研发主管:AI 是如何改进芯片设计的?
- 高通WLAN框架学习(29)-- 6GHz 概述
- 数字化转型项目做了多年,主架构师都绝望了:当初就不应该用外包!
- 汤峥嵘:CTO 是商业思维和技术思维交汇的那个点
猜你喜欢

C language simple webserver

. Net C Foundation (6): namespace - scope with name

B站高管解读财报:疫情对公司长期发展无影响 视频化趋势不可阻挡

深度剖析「圈组」关系系统设计 | 「圈组」技术系列文章

回溯法/解空间树 排列树

C # - how to add and read appsetting in the console application JSON file
![[public class preview]: mxplayer Ott audio and video transcoding practice and optimization](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[public class preview]: mxplayer Ott audio and video transcoding practice and optimization

Raspberry school literacy

Leetcode 1968. Construct an array whose elements are not equal to the average value of two adjacent elements (yes, finally solved)

社交软件Soul撤回IPO申请:上市只差临门一脚 腾讯是大股东
随机推荐
2021 年 CNCF 调查:Kubernetes 跨越鸿沟的一年
非常值得學習的調度開源庫推薦
Live800: several ways for intelligent customer service to improve customer experience
多云安全合规扫描平台之RiskScanner
Taking log4j as an example, how to evaluate and classify security risks
C. Mortal Kombat Tower(cf)dp
HMS core shows the latest open capabilities in mwc2022, helping developers build high-quality applications
2021 年度 Go 开发者调查
In depth research and analysis report on ready to eat meat market for vacuum low temperature cooking in the world and China
数据库“百亿蓝海”中,每位玩家都能找到一叶扁舟 | C位面对面
你违规了吗?
一些经典的嵌入式C面试题汇总
North China pushed Yale hard, MIT won the first place in a row, and the latest 2023qs world university ranking was released
What's a good gift for the goddess Festival on March 8? Goddess Day gift sharing
详解 Kubernetes 包管理工具 Helm
Nexus configuration Yum repository for repository manager
2022年湖南省安全员-C证考试练习题及在线模拟考试
Hashicopy之nomad应用编排方案04(伸缩及更新一个Job)
Flutter 3.0正式发布:稳定支持6大平台,字节跳动是主要用户
为什么需要public static void main(String[ ] args)这个方法?