<< back to Guides

โ›ต Helm Quick Guide

Helm is the package manager for Kubernetes, helping you define, install, and manage Kubernetes applications with reusable templates called charts.


๐Ÿ“ฆ What is a Helm Chart?

A Helm chart is a collection of files that describe a set of Kubernetes resources.

mychart/
โ”œโ”€โ”€ Chart.yaml        # Metadata (name, version, etc.)
โ”œโ”€โ”€ values.yaml       # Default configuration values
โ”œโ”€โ”€ templates/        # Kubernetes manifests (templates)
โ”‚   โ”œโ”€โ”€ deployment.yaml
โ”‚   โ”œโ”€โ”€ service.yaml
โ”‚   โ””โ”€โ”€ _helpers.tpl

๐Ÿš€ Basic Helm Workflow

# 1. Install Helm (if not already)
brew install helm       # macOS
choco install kubernetes-helm   # Windows

# 2. Create a new chart
helm create mychart

# 3. Install a chart
helm install my-release ./mychart

# 4. Upgrade a release
helm upgrade my-release ./mychart

# 5. Uninstall a release
helm uninstall my-release

# 6. View releases
helm list

๐Ÿ›  Template Example: deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}-app
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
    spec:
      containers:
        - name: app
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
          ports:
            - containerPort: 80

๐Ÿ“˜ Common Helm Commands

helm repo add bitnami https://charts.bitnami.com/bitnami
helm search repo nginx
helm fetch bitnami/nginx
helm template my-release ./mychart      # Render templates locally
helm get all my-release                 # Get release details
helm lint ./mychart                     # Lint your chart

๐Ÿงพ values.yaml Example

replicaCount: 2

image:
  repository: nginx
  tag: latest

service:
  type: ClusterIP
  port: 80

๐ŸŽ› Helm with Custom Values

# Override with a custom values file
helm install my-release ./mychart -f custom-values.yaml

# Override inline
helm install my-release ./mychart --set replicaCount=3

๐Ÿงฉ Useful Features


โœ… Best Practices


<< back to Guides