Helm Charts Explained
The package manager for Kubernetes
What is Helm?
Helm is a package manager for Kubernetes.
Just like apt manages packages on Debian or
brew on macOS, Helm manages Kubernetes applications.
It bundles multiple K8s manifests into a single deployable unit called a
Chart.
service.yaml
configmap.yaml
ingress.yaml
secret.yaml
hpa.yaml
... manage each one separately
One command deploys everything
Three Core Concepts
Chart Directory Structure
apiVersion: v2
name: my-app
version: 1.2.0
appVersion: "3.1.0"
description: My app chart
dependencies:
- name: postgresql
version: "12.x"
repository: "https://..."
replicaCount: 3 image: repository: myapp tag: "3.1.0" service: type: ClusterIP port: 8080 ingress: enabled: true host: app.example.com
How Helm Renders & Deploys
Helm merges templates + values → renders plain YAML → applies to cluster
replicas: {{ .Values.replicaCount }}
image: {{ .Values.image.repo }}
replicaCount: 3 image: repo: myapp:v2
apiVersion: apps/v1
kind: Deployment
spec:
replicas: 3 # resolved!
containers:
- image: myapp:v2 # resolved!
Release Lifecycle
Helm tracks every change as a numbered revision, making rollbacks trivial.
helm install my-release ./chart
helm upgrade my-release ./chart
helm rollback my-release 1
helm uninstall my-release
helm history my-release shows all revisions
helm list
— List all releases
helm status my-release
— Show release info
helm template ./chart
— Render locally (dry run)
helm lint ./chart
— Validate chart
helm dependency update
— Pull sub-charts
helm package ./chart
— Create .tgz archive
Go Templating in Helm
Helm uses Go's text/template with Sprig functions for powerful manifest generation.
replicas: {{ .Values.replicaCount }}
image: {{ .Values.image.repo }}
replicas: 3 image: myapp:v2.1.0
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
...
{{- end }}
# ingress.enabled = true apiVersion: networking.k8s.io/v1 kind: Ingress ...
{{- range .Values.env }}
- name: {{ .name }}
value: {{ .value | quote }}
{{- end }}
- name: DB_HOST value: "postgres.svc" - name: LOG_LEVEL value: "info"
{{/* _helpers.tpl */}}
{{- define "mychart.labels" -}}
app: {{ .Chart.Name }}
version: {{ .Chart.AppVersion }}
{{- end }}
{{/* usage in template */}}
labels:
{{- include "mychart.labels" . | nindent 4 }}
labels:
app: my-app
version: 3.1.0
.Values
Values from values.yaml and overrides
.Chart
Chart.yaml metadata (Name, Version, etc.)
.Release
Release info (Name, Namespace, Revision)
.Template
Current template file info
.Capabilities
K8s cluster capabilities & API versions
Related Topics
Kustomize
Base/overlay architecture, patches, generators, and template-free configuration customization for Kubernetes.
GCP IAM
Identity & Access Management — principals, roles, hierarchy, service accounts, and policy evaluation in one mental model.
RabbitMQ
Producers, exchanges, queues, and consumers. Route messages reliably between services with animated flow diagrams.