In this guide, we explore how Helm Charts simplify application deployment on Kubernetes. Helm is a powerful command-line tool that automates complex operations, such as installation, uninstallation, upgrades, and rollbacks. Rather than executing multiple manual steps, you instruct Helm to perform the desired action, and it takes care of all the necessary behind-the-scenes processes. Helm achieves this automation using Charts. Charts are collections of files that define all the Kubernetes resources needed for an application. They include templated files (with a defined structure) that dynamically replace placeholders with values from a configuration file (typicallyDocumentation Index
Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
Use this file to discover all available pages before exploring further.
values.yaml). For example, placeholders for image names or replica counts in Kubernetes manifests can be populated with user-defined values during deployment.
Below are examples of two templated Kubernetes objects—a Service and a Deployment—for a simple application:
Chart.yaml and Helm Chart Structure
Every Helm Chart includes aChart.yaml file that holds metadata about the chart. This metadata covers the chart API version, application version, chart version, name, description, and additional descriptive fields. For example, Helm 3 charts set the API version to v2, while Helm 2 charts use v1. This versioning ensures that Helm correctly interprets available features like dependency and type.
Below is an example of a Chart.yaml file for a WordPress Chart:
Chart.yaml include:
- apiVersion: Indicates the chart API version. Helm 3 charts use
v2and Helm 2 charts usev1. - appVersion: Specifies the version of the packaged application (e.g., WordPress version 5.8.1).
- version: Represents the chart version and helps track changes independently of the application version.
- name, description, and type: Define the chart’s name (WordPress), provide a brief description, and indicate that it is an “application” type chart.
- dependencies: Lists any dependent charts. In this example, the WordPress chart depends on a MariaDB chart, managing its deployment separately.
- keywords, maintainers, home, and icon: Provide additional metadata useful for chart discovery and reference.
- A templates directory containing all templated resource manifests.
- A values.yaml file that defines configuration parameters.
- A Chart.yaml file holding chart metadata.
- Optionally, a charts directory for dependencies and files such as a README or license.
Helm charts integrate templated manifests with customizable configurations, streamlining application deployment on Kubernetes. This eliminates many manual steps and ensures consistency across environments.