Helm Overview
Helm is the package manager for Kubernetes. It packages Kubernetes resources into reusable charts, supports parameterized deployments through values files, and simplifies upgrades, rollbacks and multi-environment deployments.
Chart → Values → helm install → Release → Kubernetes Resources
| Component | Purpose | Enterprise Recommendation |
|---|
| Chart | Application package | One chart per service |
| Values | Configuration | Separate per environment |
| Release | Installed chart | Track versions |
Helm Architecture
Git → CI/CD → Helm Chart → Values → Kubernetes API → Cluster
Chart Structure
mychart/
├── Chart.yaml
├── values.yaml
├── charts/
├── templates/
│ ├── deployment.yaml
│ ├── service.yaml
│ ├── ingress.yaml
│ ├── _helpers.tpl
│ └── NOTES.txt
└── .helmignore
Chart.yaml
apiVersion: v2
name: myapp
version: 1.0.0
appVersion: "1.0.0"
type: application
Values Files
image:
repository: ghcr.io/company/app
tag: 1.0.0
replicaCount: 3
service:
type: ClusterIP
| File | Use |
|---|
| values.yaml | Default values |
| values-dev.yaml | Development |
| values-prod.yaml | Production |
Templates
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "myapp.fullname" . }}
spec:
replicas: {{ .Values.replicaCount }}
Template Functions
{{ default "nginx" .Values.image.repository }}
{{ upper .Values.environment }}
{{ quote .Values.tag }}
Helpers
{{- define "myapp.fullname" -}}
{{ .Release.Name }}-{{ .Chart.Name }}
{{- end -}}
Dependencies
dependencies:
- name: redis
version: 20.x.x
repository: https://charts.bitnami.com/bitnami
Repositories & OCI
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm pull oci://registry.example.com/charts/myapp
Releases
helm install app ./chart
helm list
helm status app
Upgrades & Rollbacks
helm upgrade app ./chart -f values-prod.yaml
helm history app
helm rollback app 2
| Strategy | Benefit |
|---|
| helm upgrade | Controlled release |
| helm rollback | Fast recovery |
GitOps
Helm integrates with Argo CD and Flux. Store charts and values in Git and let GitOps controllers synchronize cluster state automatically.
Security Best Practices
- Do not store secrets in values files.
- Use external secret managers.
- Lint charts before release.
- Pin chart versions.
- Review templates.
Troubleshooting
| Problem | Check |
|---|
| Template error | helm template |
| Failed upgrade | helm history |
| Bad values | helm lint |
helm lint ./chart
helm template ./chart
helm get values app
helm history app
Useful Commands
helm create app
helm lint
helm template
helm install
helm upgrade
helm rollback
helm uninstall
helm list
helm status
helm history
helm dependency update
helm package
helm repo add
helm search repo
Key Takeaways
Helm standardizes Kubernetes application packaging and deployment. Combined with GitOps, version-controlled values and CI/CD, it enables repeatable, auditable and production-ready releases.