Skip to content
EN

Что такое Helm

Коротко:

Helm — де-факто package manager для Kubernetes (CNCF graduated 2020). Chart = packaged set YAML templates + default values, installable через helm install. Solves: template repetition, multi-environment configs (values-prod.yaml vs values-dev.yaml), versioning. Alternatives: Kustomize (simpler but без packaging), raw manifests (ранняя стадия).

Ниже: подробности, пример, смежные термины, FAQ.

Проверить свой сайт →

Подробности

  • Chart: folder with Chart.yaml + templates/ + values.yaml
  • Release: deployed instance of chart (namespaced)
  • Values: override defaults per environment
  • Helm Hub / Artifact Hub: public chart registry
  • OCI support: Helm 3.8+ push charts в OCI registries (ghcr, ECR)

Пример

# Install chart
helm install my-release bitnami/postgresql \
  --set primary.persistence.size=100Gi \
  --set auth.postgresPassword=secret

# values-prod.yaml override
helm upgrade my-release bitnami/postgresql \
  -f values-prod.yaml

Смежные термины

How Helm Works

Helm uses charts to package Kubernetes resources. A chart is a collection of YAML templates and default values. helm install is used to deploy a chart onto a Kubernetes cluster.

When you install a chart, Helm creates and applies the necessary Kubernetes resources based on the templates and values provided.

Helm also supports releases, which are instances of a chart deployed onto a cluster. Each release has its own release name, version, and set of values.

To manage releases, Helm provides commands like helm list to view all releases, helm upgrade to update an existing release, and helm uninstall to delete a release.

Advantages of Using Helm

Helm offers several advantages for managing Kubernetes applications:

  • Reusability: Charts can be reused across different projects and environments.
  • Configuration flexibility: Helm allows for different configurations (values files) for different environments, such as production and development.
  • Version control: Helm tracks the versions of charts and releases, making it easier to roll back to previous versions if needed.
  • Simplified templating: Helm templates help avoid repetition and make it easier to manage complex Kubernetes manifests.

These advantages make Helm a powerful tool for managing Kubernetes applications at scale.

Common Helm Commands

Here are some common Helm commands and their usage:

  • helm install <chart-name> <release-name> --set key1=value1,key2=value2 - Installs a chart with specified release name and overrides default values.
  • helm list - Lists all releases in the cluster.
  • helm upgrade <release-name> <chart-name> --set key1=value1 - Upgrades an existing release with new values.
  • helm uninstall <release-name> - Uninstalls a release from the cluster.
  • helm search <chart-name> - Searches for charts in the Helm repository.

These commands provide a powerful way to manage Helm charts and releases in a Kubernetes cluster.

Больше по теме

Часто задаваемые вопросы

Helm или Kustomize?

Helm — packaging + templating. Kustomize — overlay-based без templates. Для distribution (public charts) — Helm. Для simple mono-repo — Kustomize.

Helm 2 vs Helm 3?

Helm 2 имел Tiller (server component) — security issues. Helm 3 — tiller-less, RBAC-aware. Все используют Helm 3 с 2020.

Где найти charts?

Artifact Hub (artifacthub.io) — 12k+ charts. Bitnami, Prometheus, Grafana, cert-manager — основные maintainers.

Запустить инструмент, который описан в этой статье

Бесплатный тариф — 10 мониторов, проверки каждые 5 мин, без карты. Платные тарифы — интервал от 1 минуты и проверки из нескольких регионов.