Amazon EKS — Helm Deployments
Helm Deployments
Helm is the package manager for Kubernetes. It bundles YAML manifests into reusable, versioned charts.
Why Helm?
| Without Helm | With Helm |
|---|---|
| 10+ YAML files per app | 1 chart, parameterized |
| Copy-paste between envs | values-dev.yaml, values-prod.yaml |
| Manual version tracking | helm history, helm rollback |
| No templating | Go templates + helpers |
Key Concepts
Chart Structure
my-app/
├── Chart.yaml # Chart metadata (name, version)
├── values.yaml # Default configuration values
├── templates/
│ ├── deployment.yaml # Deployment template
│ ├── service.yaml # Service template
│ ├── ingress.yaml # Ingress template
│ ├── hpa.yaml # HPA template
│ └── _helpers.tpl # Template helpers
└── charts/ # Sub-chart dependencies
Common Commands
# Add a chart repo
$ helm repo add bitnami https://charts.bitnami.com/bitnami
# Search for charts
$ helm search repo nginx
# Install a chart
$ helm install my-nginx bitnami/nginx --namespace web --create-namespace
# Install with custom values
$ helm install my-app ./my-chart -f values-prod.yaml
# Upgrade
$ helm upgrade my-app ./my-chart -f values-prod.yaml
# Rollback
$ helm rollback my-app 1
# View history
$ helm history my-app
REVISION STATUS DESCRIPTION
1 superseded Install complete
2 deployed Upgrade complete
Values Override
# values.yaml (defaults)
replicaCount: 2
image:
repository: myapp
tag: latest
resources:
requests:
cpu: 100m
memory: 128Mi
# values-prod.yaml (production overrides)
replicaCount: 5
image:
tag: v2.1.0
resources:
requests:
cpu: 500m
memory: 512Mi
Common Mistakes
| Mistake | Impact |
|---|---|
| Not pinning chart versions | Unexpected changes on upgrade |
| Hardcoding values in templates | Can’t reuse across environments |
Not using helm diff before upgrade |
Surprise changes |
| Storing secrets in values.yaml | Security risk |
What’s Next?
Git-driven delivery: ArgoCD & GitOps.