Skip to main content

The Basics

Helm is a package manager for Kubernetes that helps you define, install, and manage applications. Helm charts are packages of pre-configured Kubernetes resources that allow for easy deployment and scaling of applications. Charts are reusable and customizable, making it easier to manage Kubernetes applications.

A Helm chart consists of templates, configuration values, and metadata that define Kubernetes resources like deployments, services, and ingress. When you deploy a chart, Helm takes these templates and renders them into Kubernetes manifests by substituting values from the values.yaml file (or from the command line). Helm then sends the final rendered manifests to the Kubernetes API server for deployment.

Helm Chart Structure

Helm Charts consist of a structured set of files and directories that work together to define, configure, and deploy Kubernetes applications. Below is the typical structure of a Helm Chart.

└── helm
├── LICENSE
├── README.md
├── .helmignore
├── Chart.yaml
├── values.yaml
├── charts
└── templates
├── NOTES.txt
├── _helpers.tpl
├── deployment.yaml
├── hpa.yaml
├── ingress.yaml
├── service.yaml
├── serviceaccount.yaml
└── tests

Let's take a quick look at what everything does.

File / FolderRequiredDescription
LICENSENoIncludes open source license.
README.mdNoCan include notes / basic information about the Helm Chart here.
.helmignoreRecommendedDefines patterns to ignore when building packages.
Chart.yamlYesContains the meta data for the chart.
values.yamlYesContains the default configuration values that the templates refer to.
charts folderNoHolds subcharts or chart dependencies.
templates folderYesThis is the heart of the Helm Chart where you include the Kubernetes resources templates. The templates included here, combined with the default values in values.yaml, are what inform the Kubernetes manifest file. This folder must contain at least one valid file.
templates/NOTES.txtOptionalThis is an optional file which provides information about our helm chart , This file is rendered same as regular template file by helm , after notes.txt is rendered its not sent to k8s cluster , but output is displayed in CLI window.
templates/_helpers.yamlOptionalDefines help functions / macros for the templates to use.
templates/deployment.yamlRecommendedDescribes how to deploy the application.
templates/hpa.yamlNoDefines HorizontalPodAutoscaler resources if for auto-scaling, if required.
templates/ingress.yamlOptionalDefines ingress rules to expose services outside the cluster. Needed only if external access is required.
templates/service.yamlRecommendedExposes pods via a Kubernetes Service.
templates/serviceaccount.yamlNoIf required, defines the service account that the app should run as.
templates/tests folderNoContains Helm test hooks to verify that the chart works.