Home/Engineer/Docker / Containers/Helm Chart Basics — Kubernet…
Docker / ContainersIntermediateUbuntuDebianCentOShelmkubernetesk8s

Helm Chart Basics — Kubernetes Package Management

Covers the essential Kubernetes package management basics: installing Helm, deploying public charts, customizing with values.yaml, writing your own charts, and managing releases.

Contents
  1. Installing Helm
  2. Core Concepts
  3. Repository Management
  4. Deploying Charts (install / upgrade)
  5. Release Management
  6. Creating Your Own Chart
  7. Customizing values.yaml
  8. Template Syntax Basics

Installing Helm

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

# macOS
brew install helm

# Check version
helm version

Core Concepts

TermDescription
ChartHelm package (collection of Kubernetes resource templates)
RepositoryChart repository
ReleaseChart instance deployed to a cluster
ValuesChart configuration values (values.yaml)

Repository Management

Bash
# Add the official stable repo
helm repo add stable https://charts.helm.sh/stable
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx

# List repos
helm repo list

# Update repos
helm repo update

# Search charts
helm search repo nginx
helm search repo bitnami/postgresql

Deploying Charts (install / upgrade)

Bash
# Basic install
helm install my-nginx ingress-nginx/ingress-nginx

# Specify a namespace
helm install my-nginx ingress-nginx/ingress-nginx   --namespace ingress-nginx   --create-namespace

# Customize with a values.yaml file
helm install my-app bitnami/wordpress -f custom-values.yaml

# Override values from the command line
helm install my-pg bitnami/postgresql   --set auth.postgresPassword=MySecretPass   --set primary.persistence.size=20Gi

# Dry run (preview without deploying)
helm install my-app bitnami/nginx --dry-run --debug

# Upgrade (install if missing)
helm upgrade --install my-nginx ingress-nginx/ingress-nginx

Release Management

Bash
# List deployed releases
helm list
helm list -A            # All namespaces

# Release status
helm status my-nginx

# Show applied values
helm get values my-nginx

# Release history
helm history my-nginx

# Rollback
helm rollback my-nginx 1    # To revision 1

# Uninstall
helm uninstall my-nginx

Creating Your Own Chart

Bash
helm create mychart

# Generated structure
mychart/
├── Chart.yaml           # Chart metadata
├── values.yaml          # Default values
├── templates/           # Kubernetes resource templates
│   ├── deployment.yaml
│   ├── service.yaml
│   ├── ingress.yaml
│   └── _helpers.tpl     # Shared template helpers
└── charts/              # Dependent charts

Customizing values.yaml

YAML
# values.yaml
replicaCount: 3

image:
  repository: nginx
  tag: "1.25"
  pullPolicy: IfNotPresent

service:
  type: ClusterIP
  port: 80

resources:
  limits:
    cpu: 500m
    memory: 128Mi
  requests:
    cpu: 100m
    memory: 64Mi

ingress:
  enabled: true
  host: myapp.example.com

Template Syntax Basics

YAML
# templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "mychart.fullname" . }}
  labels:
    {{- include "mychart.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    spec:
      containers:
      - name: {{ .Chart.Name }}
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        ports:
        - containerPort: {{ .Values.service.port }}
        {{- if .Values.resources }}
        resources:
          {{- toYaml .Values.resources | nindent 10 }}
        {{- end }}
Bash
# Preview rendered templates
helm template mychart ./mychart -f my-values.yaml

# Lint
helm lint ./mychart
#helm#kubernetes#k8s#devops
Editorial note

AI tools may assist drafting. Check the evidence in each guide for whether commands were run and which environment was used. Confirm the current docs for your version before applying instructions, and email us about errors. email us

Topic-related official docs (auto-linked · not per-claim sources)Kubernetes documentation ↗Docker documentation ↗

Questions & answers

Ask a question about this guide. We'll review and reply.