Helm v2 Documentation
website·Indexed 18 days ago
https://v2.helm.sh/docs/Documentation for Helm, the package manager for Kubernetes. This resource covers installation, architecture, and the use of the Helm client and Tiller server. It includes comprehensive guides on creating and managing Helm charts, using Go templates and the Sprig library, configuring chart repositories, and implementing role-based access control (RBAC) and SSL/TLS security.
What's inside Helm
- Helm and Tiller use a client-side SSL certificate authentication model. Tiller verifies the client's certificate using a Certificate Authority (CA), and the Helm client verifies Tiller's identity using the same CA. As of Helm 2.7.2, Tiller requires that the client certificate be validated by its CA; self-signed certificates are no longer supported.
Overview of Helm for Kubernetes
Helm is a package manager for Kubernetes that allows users to find, share, and use software built for Kubernetes. It uses 'Charts' to define, install, and upgrade Kubernetes applications, providing a repeatable way to manage complex application deployments and avoiding manual copy-pasting of manifests.Understand Helm Chart Repositories
A Chart Repository is an HTTP server that hosts anindex.yamlfile (describing available charts and their download locations) and the chart archives themselves. Helm clients can connect to multiple repositories; by default, they point to the officialstableKubernetes chart repository.Understand the Helm chart file structure
A Helm chart is a collection of files organized in a directory named after the chart. Helm expects a specific directory tree to generate valid Kubernetes manifest files. Thecharts/andtemplates/directories, as well as specific filenames likeChart.yamlandvalues.yaml, are reserved by Helm.wordpress/ Chart.yaml # A YAML file containing information about the chart LICENSE # OPTIONAL: A plain text file containing the license for the chart README.md # OPTIONAL: A human-readable README file requirements.yaml # OPTIONAL: A YAML file listing dependencies for the chart values.yaml # The default configuration values for this chart charts/ # A directory containing any charts upon which this chart depends. templates/ # A directory of templates that, when combined with values, # will generate valid Kubernetes manifest files. templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notesInspect a Helm chart
Thehelm inspectcommand allows you to view information about a chart. It can take a chart reference (e.g., 'stable/drupal'), a full path to a directory or packaged chart, or a URL. By default, it prints the contents of theChart.yamlandvalues.yamlfiles.helm inspect [CHART] [flags]Understand Helm chart repository structure
A Helm chart repository is an HTTP server that hosts anindex.yamlfile and packaged charts (tarballs). Theindex.yamlfile acts as a directory of all available charts, containing metadata and download URLs. While charts can be hosted on a different server than the index file, they are typically co-located for simplicity.charts/ |- |- index.yaml |- alpine-0.1.2.tgz |- alpine-0.1.2.tgz.provUnderstand the role of Tiller
Tiller is the server-side component of Helm (in-cluster). It interacts with the Kubernetes API server to perform the actual installation, upgrading, and removal of resources, and it maintains the state of releases.Helm Architecture: Client and Tiller Server interaction
Helm's architecture is split between a client and an in-cluster server:
The Helm Client (CLI):
- Handles local chart development and repository management.
- Communicates with the Tiller server to send charts for installation, request release information, or trigger upgrades and uninstalls.
The Tiller Server (In-cluster):
- Listens for requests from the Helm client.
- Combines a chart and configuration to build a release.
- Interfaces with the Kubernetes API server to install, upgrade, and uninstall charts.
- Tracks releases by storing information in Kubernetes ConfigMaps (no external database required).
Understand Helm Chart components and structure
A Helm Chart is a package containing information needed to install Kubernetes resources. It must include aChart.yamlfile and typically contains templates and avalues.yamlfile for default configurations. Charts are developed in a specific directory structure and can be packaged into a 'chart archive' (a tarred and gzipped file). Charts must be versioned according to the SemVer 2 specification.Access Helm command help
To find information about available Helm commands or specific flags, use thehelm helpcommand or append the-hflag to any specific command.$ helm get -hUnderstand Helm chart repositories
A chart repository is an HTTP server that serves packaged charts (tar files) and a special
index.yamlfile. Theindex.yamlfile contains a list of all available packages and the metadata required to retrieve and verify them.Key details:
- Server Requirements: Any HTTP server capable of serving YAML and tar files via GET requests can act as a repository (e.g., Google Cloud Storage or S3 with website mode enabled).
- Local Testing: Use
helm servefor a built-in package server during development. - Client Management: Use
helm repocommands to manage repositories on the client side. - Uploads: Helm does not provide built-in tools for uploading charts to remote servers; this must be handled by the server implementation or external tools.
Understand the Helm chart directory structure
A Helm chart is a collection of files organized in a directory named after the chart. Helm expects a specific directory tree to generate valid Kubernetes manifest files. Thecharts/andtemplates/directories, as well as the primary configuration files, are reserved by Helm.wordpress/ Chart.yaml # A YAML file containing information about the chart LICENSE # OPTIONAL: A plain text file containing the license for the chart README.md # OPTIONAL: A human-readable README file requirements.yaml # OPTIONAL: A YAML file listing dependencies for the chart values.yaml # The default configuration values for this chart charts/ # A directory containing any charts upon which this chart depends. templates/ # A directory of templates that, when combined with values, # will generate valid Kubernetes manifest files. templates/NOTES.txt # OPTIONAL: A plain text file containing short usage notes