MASTER YOUR
K8S PACKAGES

// The Kubernetes package manager.

HELM IS THE MISSING PACKAGE MANAGER FOR KUBERNETES.

Deploying complex applications on Kubernetes requires dozens of YAML files—ConfigMaps, Secrets, Deployments, Services, and more. Helm packages all of this into a single chart that can be installed with one command.

WHY HELM?

Helm is to Kubernetes what apt is to Debian. It templatizes Kubernetes manifests, enables versioned releases, and makes upgrades and rollbacks trivial. Share charts via repositories like Helm Hub.

BECOME A K8S PACKAGE PRO.

Learn Helm charts, templates, values, releases, and rollbacks. Deploy complex applications like Prometheus, Grafana, and Jenkins with confidence.

BEGIN YOUR JOURNEY →

// The Path to Helm Mastery

10 lessons. Complete Helm control.

LESSON 01

Introduction to Helm

What is Helm and why you need it

Beginner
LESSON 02

Installing Helm

Set up Helm and configure repositories

Beginner
LESSON 03

Charts & Releases

Understand Helm charts and releases

Beginner
LESSON 04

Basic Commands

Install, upgrade, and uninstall charts

Beginner
LESSON 05

Values & Templates

Customize charts with values

Intermediate
LESSON 06

Hooks & Lifecycle

Manage pre/post-install hooks

Intermediate
LESSON 07

Dependencies

Manage chart dependencies

Intermediate
LESSON 08

Testing Charts

Validate and test your charts

Intermediate
LESSON 09

Creating Charts

Build your own Helm charts

Advanced
LESSON 10

Helmfile & Advanced

Helmfile, libraries, and advanced patterns

Advanced

// Why Helm

Helm was created by Deis (now Microsoft) and donated to the CNCF. It's now the de facto standard for packaging Kubernetes applications.

Without Helm, deploying something like the ELK stack requires managing 20+ YAML files with complex relationships. With Helm, one command handles everything: helm install elastic/elasticsearch.

Helm charts support templating, versioning, rollbacks, and dependencies. The Helm Hub hosts thousands of community charts for everything from databases to monitoring.

Your Kubernetes deployments deserve package management.

// Tools & References

📖 Helm Docs

Official Documentation

helm.sh/docs

☸️ Artifact Hub

Find Charts

artifacthub.io

📦 Chart Repository

Publish Charts

ChartMuseum

🔧 Helmfile

Declarative Charts

helmfile

🧪 Helm unittest

Chart Testing

unittest

⎈ Helm Operators

Operator Pattern

OperatorHub

// Introduction to Helm

×

What is Helm?

Helm is the package manager for Kubernetes. It bundles Kubernetes manifests (YAML files) into a deployable unit called a chart. A single command can deploy complex applications.

Helm Concepts

  • Chart: A package of Kubernetes YAML templates
  • Release: A deployed instance of a chart
  • Repository: A place to store and share charts
  • Values: Configuration to customize chart deployment
  • Templates: Go templates that generate Kubernetes manifests
HELM'S PHILOSOPHY: "Helm is apt for Kubernetes." Just as apt manages Debian packages, Helm manages Kubernetes applications.

Installing Helm

$ curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash # Download and install helm $ helm version v3.14.0+build.HELMVERSION

Quiz

1. Helm is the _____ manager for Kubernetes.

Hint: Package type

2. A deployed chart instance is called a _____.

Hint: Versioned deployment

3. Charts use Go _____ for templating.

Hint: Template files

4. Charts are stored in a _____ repository.

Hint: What Helm uses

5. Values _____ chart deployment.

Hint: Configure

Show Answers

Answers

1. Package

2. Release

3. Templates

4. Chart

5. Customize

// Installing Helm

×

Adding Repositories

Helm charts are stored in repositories. Add popular repositories to access stable charts for common applications.

Common Repositories

$ helm repo add bitnami https://charts.bitnami.com/bitnami # Add Bitnami charts (many popular apps) $ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts # Add Prometheus community charts $ helm repo update # Update local cache of charts $ helm repo list # List added repositories

Finding Charts

$ helm search hub nginx # Search Helm Hub for nginx $ helm search repo nginx # Search locally added repos

Quiz

1. Add repo with helm repo _____.

Hint: Add command

2. Update local cache with helm repo _____.

Hint: Refresh

3. Search Hub with helm _____ hub.

Hint: Find

Show Answers

Answers

1. Add

2. Update

3. Search

// Charts & Releases

×

Chart Structure

A Helm chart is a directory with a specific structure containing templates, values, and metadata.

Chart Directory

# mychart/ Chart.yaml # Chart metadata values.yaml # Default values templates/ # Kubernetes manifests deployment.yaml service.yaml ingress.yaml charts/ # Chart dependencies README.md # README LICENSE # License

Chart.yaml

apiVersion: v2 name: mychart version: 1.0.0 appVersion: "1.0" description: My Kubernetes chart

Quiz

1. Chart metadata is in _____.

Hint: YAML file

2. Default values are in _____.

Hint: Values file

3. K8s manifests go in the _____ directory.

Hint: Template folder

Show Answers

Answers

1. Chart.yaml

2. Values.yaml

3. Templates

// Basic Commands

×

Installing Charts

$ helm install my-release bitnami/nginx # Install nginx chart from bitnami repo $ helm list # List deployed releases $ helm status my-release # Show release status

Upgrading & Rollback

$ helm upgrade my-release bitnami/nginx --set replicaCount=3 # Upgrade with new values $ helm rollback my-release 1 # Rollback to revision 1 $ helm history my-release # Show release history

Uninstalling

$ helm uninstall my-release # Remove release $ helm uninstall my-release --keep-history # Keep history for rollback

Quiz

1. Install chart with helm _____.

Hint: Deploy

2. List releases with helm _____.

Hint: Show all

3. Go back with helm _____.

Hint: Undo

4. Remove release with helm _____.

Hint: Delete

Show Answers

Answers

1. Install

2. List

3. Rollback

4. Uninstall

// Values & Templates

×

Overriding Values

Charts have default values in values.yaml. Override them with --set flags or custom values files.

Setting Values

$ helm install my-release bitnami/wordpress --set replicaCount=2 # Override with --set $ helm install my-release bitnami/wordpress -f custom-values.yaml # Override with values file

Template Syntax

# In templates/deployment.yaml apiVersion: apps/v1 kind: Deployment metadata: name: {{ .Release.Name }} spec: replicas: {{ .Values.replicaCount }} template: spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Quiz

1. Override values with --_____ flag.

Hint: Set command

2. Use custom file with -f _____.

Hint: Your file

3. Access release name with ._____.Name.

Hint: Deployment concept

4. Access values with ._____.fieldName.

Hint: Values.yaml

Show Answers

Answers

1. Set

2. Filename

3. Release

4. Values

// Hooks & Lifecycle

×

What are Hooks?

Hooks run arbitrary jobs at specific points in a release lifecycle—before install, after install, before upgrade, etc.

Hook Types

# pre-install - Before template render # post-install - After resources created # pre-upgrade - Before upgrade # post-upgrade - After upgrade # pre-delete - Before delete # post-delete - After delete # test - Run test hooks

Hook Annotation

apiVersion: v1 kind: Job metadata: name: backup-job annotations: "helm.sh/hook": post-install,post-upgrade "helm.sh/hook-weight": "-1" "helm.sh/hook-delete-policy": hook-succeeded

Quiz

1. Run job after install with _____ install hook.

Hint: After

2. Hook weight uses annotation helm.sh/hook _____.

Hint: Order

3. Delete hook policy uses helm.sh/hook-delete _____.

Hint: What to do

Show Answers

Answers

1. Post

2. Weight

3. Policy

// Dependencies

×

Chart Dependencies

Charts can depend on other charts. The dependencies section in Chart.yaml declares them.

Dependency Declaration

apiVersion: v2 name: mychart version: 1.0.0 dependencies: - name: postgresql version: "12.x.x" repository: "https://charts.bitnami.com/bitnami" - name: redis version: "17.x.x" repository: "https://charts.bitnami.com/bitnami"

Managing Dependencies

$ helm dependency update mychart # Download dependencies to charts/ $ helm dependency build mychart # Build from Chart.lock

Quiz

1. Dependencies declared in _____.

Hint: Chart file

2. Download dependencies with helm dependency _____.

Hint: Get

3. Dependencies stored in _____ directory.

Hint: Folder

Show Answers

Answers

1. Chart.yaml

2. Update

3. Charts

// Testing Charts

×

Linting Charts

Before deploying, validate your chart for syntax errors and best practices.

Lint Command

$ helm lint mychart # Lint chart for issues $ helm lint mychart --strict # Enable strict validation

Template Rendering

$ helm template mychart ./mychart # Render templates locally $ helm template mychart ./mychart --debug # Show template debug output $ helm install --dry-run mychart ./mychart # Test install without cluster

Quiz

1. Validate chart with helm _____.

Hint: Check

2. Render templates locally with helm _____.

Hint: Show

3. Test without cluster using --dry-_____.

Hint: Test

Show Answers

Answers

1. Lint

2. Template

3. Run

// Creating Charts

×

Scaffolding a Chart

Helm can scaffold a new chart with the basic structure.

Create Chart

$ helm create mychart # Create chart directory structure $ ls mychart Chart.yaml values.yaml templates/ $ helm package mychart # Package chart into .tgz

Example Deployment Template

apiVersion: apps/v1 kind: Deployment metadata: name: {{ include "mychart.fullname" . }} labels: {{- include "mychart.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: {{- include "mychart.selectorLabels" . | nindent 6 }}

Quiz

1. Scaffold chart with helm _____.

Hint: Make

2. Package chart into ._____ file.

Hint: Compressed

3. Include helper with _____ function.

Hint: Bring in

Show Answers

Answers

1. Create

2. tgz

3. Include

// Helmfile & Advanced

×

Helmfile

Helmfile extends Helm with declarative configuration for managing multiple releases across different environments.

Helmfile Example

repositories: - name: bitnami url: https://charts.bitnami.com/bitnami releases: - name: nginx chart: bitnami/nginx values: - replicaCount: 2 - name: prometheus chart: prometheus-community/prometheus namespace: monitoring values: - alertmanager: enabled: true

Helmfile Commands

$ helmfile apply # Deploy all releases $ helmfile diff # Show changes without applying $ helmfile destroy # Remove all releases

Quiz

1. _____ extends Helm for multi-environment deployments.

Hint: File type

2. Deploy with helmfile _____.

Hint: Run

3. Show diff without applying with helmfile _____.

Hint: Show

Show Answers

Answers

1. Helmfile

2. Apply

3. Diff