Helm Kubernetes Packaging

Helm: The Package Manager for Kubernetes

YT
Yuki Tanaka
DevOps Engineer
May 12, 2025
14 min read

What You'll Learn

Introduction to Helm, the package manager for Kubernetes. Learn how to search, install, create, and deploy Helm charts to manage complex K8s applications.

What is Helm?

Helm is the package manager for Kubernetes, akin to apt for Ubuntu or npm for Node.js. It packages multiple Kubernetes manifests (Deployments, Services, ConfigMaps) into a single logical unit called a Chart.

Templating

Inject variables into YAML files instead of duplicating manifests for dev/prod.

Releases

Track deployments as "Releases" enabling easy rollbacks and upgrades.

Sharing

Install complex community apps (Redis, Prometheus, Nginx) with one command.

Using Community Charts

bash — Helm CLI basics
# 1. Add a repository
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update

# 2. Search for charts
helm search repo mysql

# 3. View default values
helm show values bitnami/mysql > values.yaml

# 4. Install a chart (creates a "Release")
helm install my-db bitnami/mysql \
    --namespace database \
    --create-namespace \
    --set auth.rootPassword=secretpassword \
    -f custom-values.yaml

# 5. List releases
helm ls -n database

# 6. Upgrade a release
helm upgrade my-db bitnami/mysql -f new-values.yaml

# 7. Rollback
helm rollback my-db 1   # Rollback to revision 1

# 8. Uninstall
helm uninstall my-db -n database

Creating Your Own Chart

You can create your own chart for your application. This allows you to deploy your app consistently across dev, staging, and production.

bash & file structure
# Create a new chart
helm create my-app

# Generates this structure:
my-app/
├── Chart.yaml          # Metadata (name, version, description)
├── values.yaml         # Default configuration values
├── charts/             # Dependencies (subcharts)
└── templates/          # Go templated Kubernetes manifests
    ├── deployment.yaml
    ├── service.yaml
    ├── ingress.yaml
    └── _helpers.tpl    # Reusable template snippets

Helm Templating Example

values.yaml
replicaCount: 3

image:
  repository: my-app
  tag: "1.2.0"

service:
  type: ClusterIP
  port: 8080
templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "my-app.fullname" . }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    spec:
      containers:
        - name: {{ .Chart.Name }}
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          ports:
            - containerPort: {{ .Values.service.port }}

DevOps Pro Tips

  • Test templates locally: helm template my-release ./my-app prints the rendered YAML without deploying.
  • Dry run: helm install --dry-run --debug my-release ./my-app simulates install and shows rendered output.
  • GitOps: In modern setups, you don't run helm install manually. Tools like ArgoCD or Flux monitor Git for changes to your `values.yaml` and apply them automatically.

Keep Reading

D
DevOps

Docker Networking Demystified: Bridge, Host & Overlay

8 min read Read More
C
Cloud

AWS IAM Roles vs Users vs Policies

10 min read Read More
P
Programming

Understanding Python's GIL & Multiprocessing

14 min read Read More