Try Sailor Cloud - 25% off!

Claim Now
Back to all posts

Helm Charts for Beginners: Deploy Applications Like a Pro

Helm Charts for Beginners: Deploy Applications Like a Pro

Helm is the package manager for Kubernetes. Just as apt manages packages on Ubuntu or npm manages packages in Node.js, Helm manages applications on Kubernetes. This guide will take you from zero to deploying applications with Helm.

What is Helm?

Helm allows you to:

  • Package applications as reusable charts
  • Install applications with a single command
  • Upgrade and rollback deployments
  • Share charts via repositories

Installing Helm

# macOS
brew install helm

# Linux
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash

# Verify installation
helm version

Helm Concepts

Chart

A package containing all Kubernetes resource definitions needed to run an application.

Release

An instance of a chart running in a cluster.

Repository

A place where charts are stored and shared.

Your First Helm Commands

Add a Repository

# Add the Bitnami repository
helm repo add bitnami https://charts.bitnami.com/bitnami

# Update repository cache
helm repo update

# Search for charts
helm search repo nginx

Install a Chart

# Install nginx
helm install my-nginx bitnami/nginx

# Install with custom values
helm install my-nginx bitnami/nginx --set service.type=ClusterIP

# Install in a specific namespace
helm install my-nginx bitnami/nginx -n production --create-namespace

Manage Releases

# List all releases
helm list

# Get release status
helm status my-nginx

# Upgrade a release
helm upgrade my-nginx bitnami/nginx --set replicaCount=3

# Rollback to previous version
helm rollback my-nginx 1

# Uninstall a release
helm uninstall my-nginx

Creating Your Own Chart

# Create a new chart
helm create my-app

# Chart structure
my-app/
├── Chart.yaml          # Chart metadata
├── values.yaml         # Default configuration
├── templates/          # Kubernetes manifests
   ├── deployment.yaml
   ├── service.yaml
   └── ingress.yaml
└── charts/             # Dependencies

Chart.yaml

apiVersion: v2
name: my-app
description: My awesome application
version: 1.0.0
appVersion: "1.0"

values.yaml

replicaCount: 2
image:
  repository: nginx
  tag: "1.21"
  pullPolicy: IfNotPresent
service:
  type: ClusterIP
  port: 80

Using Values in Templates

# 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 }}"

Helm Best Practices

  1. Use values.yaml - Never hardcode values in templates
  2. Version your charts - Semantic versioning for chart updates
  3. Template everything - Make charts reusable
  4. Document values - Add comments explaining each value
  5. Test your charts - Use helm lint and helm template

Practice Helm Skills

Helm is part of the CKAD exam curriculum. Practice deploying and managing Helm charts with Sailor.sh in our realistic lab environment.

Start Helm Practice