Helm — The Package Manager for Kubernetes
Helm is the package manager for Kubernetes. Helps you manage Kubernetes applications via Helm Charts, which define, install, and upgrade even the most complex Kubernetes apps. The de facto way to distribute production-grade K8s software.
先审查再安装
这个资产需要先审查。复制的指令会要求 Agent dry-run、列出写入项,确认后再继续。
npx -y tokrepo@latest install a2aa953c-35f3-11f1-9bc6-00163e2b0d79 --target codex先 dry-run,确认写入项后再运行此命令。
What it is
Helm is the package manager for Kubernetes. It uses Charts -- bundles of pre-configured Kubernetes resource definitions -- to define, install, and upgrade applications on any Kubernetes cluster. Helm handles dependency management, templating, and release versioning so you can deploy complex multi-service applications repeatably.
DevOps engineers deploying applications to Kubernetes, platform teams maintaining internal service catalogs, and developers who need reproducible cluster setups use Helm as the standard tool for Kubernetes package management.
How it saves time or tokens
Deploying a multi-service application to Kubernetes requires writing dozens of YAML manifests for deployments, services, config maps, secrets, and ingress rules. Helm Charts package all of these into a single installable unit with configurable values. Upgrading an application becomes a single helm upgrade command instead of manually editing and applying individual manifests. Rollbacks to previous versions are built in.
How to use
- Install Helm:
brew install helm # macOS
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- Add a chart repository and install an application:
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install my-redis bitnami/redis --set auth.password=mypassword
- Manage releases:
helm list # list installed releases
helm upgrade my-redis bitnami/redis # upgrade
helm rollback my-redis 1 # rollback to revision 1
Example
# Chart.yaml -- define your chart
apiVersion: v2
name: my-web-app
version: 1.0.0
description: A web application chart
dependencies:
- name: postgresql
version: 12.x.x
repository: https://charts.bitnami.com/bitnami
# values.yaml -- configurable defaults
replicaCount: 3
image:
repository: myorg/webapp
tag: latest
service:
type: ClusterIP
port: 80
ingress:
enabled: true
hostname: app.example.com
# Install with custom values
helm install my-app ./my-web-app -f production-values.yaml
# Template locally to preview generated manifests
helm template my-app ./my-web-app -f production-values.yaml
Related on TokRepo
- DevOps Tools -- explore DevOps and infrastructure automation tools
- Automation Tools -- discover tools for deployment and workflow automation
Common pitfalls
- Helm 3 removed Tiller (the server-side component from Helm 2). If you see Tiller-related instructions, they are outdated. Helm 3 interacts directly with the Kubernetes API.
- Chart version and app version are different. Chart version tracks the packaging, while appVersion tracks the actual application version inside the chart.
- Sensitive values (passwords, API keys) passed via --set appear in shell history. Use --values with a file or Kubernetes secrets management for production credentials.
常见问题
A Helm Chart is a package of pre-configured Kubernetes resource templates. It includes a Chart.yaml metadata file, a values.yaml with configurable defaults, and template files that generate Kubernetes manifests. Charts can declare dependencies on other charts for complex application stacks.
Helm tracks every installation and upgrade as a numbered release revision. Running helm upgrade applies new configuration or chart versions. Running helm rollback reverts to a previous revision. Helm computes the diff between revisions and applies only the changes.
Artifact Hub (artifacthub.io) is the primary directory for community Helm Charts. Major projects like Bitnami, Prometheus, and cert-manager publish official charts. Add their repositories with helm repo add and search with helm search repo.
Yes. Run helm create my-chart to scaffold a new chart with template files, values.yaml, and Chart.yaml. Customize the templates for your application resources and package with helm package for distribution.
Yes. Helm works with any Kubernetes-conformant cluster including EKS, GKE, AKS, k3s, kind, minikube, and self-managed clusters. It uses your kubeconfig for cluster access, the same as kubectl.
引用来源 (3)
- Helm GitHub— Package manager for Kubernetes using Charts
- Helm Documentation— Helm Charts define, install, and upgrade Kubernetes applications
- Artifact Hub— Community charts available on Artifact Hub
讨论
相关资产
Homebrew — The Missing Package Manager for macOS and Linux
Homebrew is the missing package manager for macOS (and Linux). Installs CLI tools, libraries, and GUI apps (casks) that Apple or your Linux distro did not include. The de facto way developers set up their Mac development environment.
WinGet — Windows Package Manager by Microsoft
WinGet is the official Windows Package Manager CLI from Microsoft. It lets you discover, install, upgrade, remove, and configure applications from the command line using a curated repository of thousands of packages.
Glasskube — Next-Generation Package Manager for Kubernetes
A modern Kubernetes package manager with a GUI and CLI that makes installing and managing cluster add-ons simple. Glasskube packages are dependency-aware, GitOps-ready, and receive automatic updates from a central repository.
Yarn — Modern JavaScript Package Manager with Plug'n'Play
Yarn is a fast, reliable JavaScript package manager with workspaces, offline caching, and an optional Plug'n'Play install strategy that eliminates node_modules.