Helm
一句话解释
Helm 是包 manager for Kubernetes 那个 uses Charts 到定义, 安装, and upgrade 复杂 applications.
用大白话说
Helm is to Kubernetes what apt or npm is to an operating system — a package manager. It lets you define, install, and upgrade Kubernetes applications using a packaging format called a Chart.
A Chart is a collection of YAML templates and a 值.yaml file. The templates describe your Kubernetes resources (Deployments, Services, etc.) with variables, and the values file provides default values for those variables. This lets you customize a deployment by overriding values without modifying the Chart.
Helm makes it easy to install complex applications with a single command (helm 安装), upgrade them (helm upgrade), and roll back (helm rollback). Many popular projects like Prometheus, Grafana, and nginx-ingress are distributed as Helm Charts.
示例
# Install an application from a Helm Chart
helm install my-release bitnami/nginx
# Upgrade with custom values
helm upgrade my-release bitnami/nginx -f values.yaml
# Roll back to previous version
helm rollback my-release 1这些 commands 安装 nginx 从 Bitnami chart, upgrade 它使用自定义值, and roll 后面到 revision 1.
工作原理
- You find or write a Helm Chart (a set of templates + values).
helm 安装renders templates with your values and applies them to the cluster.- Helm tracks the release, so you can upgrade or roll back later.
helm upgradeapplies new values or a new chart version.
常见混淆
容易混淆的对象: Kustomize
关键区别: Helm uses templating 使用变量; Kustomize uses overlay-based patching 不使用 templates.
相关术语
解读错误信息
用大白话解释常见错误——什么意思、为什么发生、如何修复。