
Kubernetes Package Management with Helm on Amazon EKS
Deploy, upgrade, rollback - managing applications the right way
Managing Kubernetes applications with raw YAML files works until it does not. When you have five YAML files per application, multiple environments, and a team making changes, things break quickly. Values get hardcoded, files go out of sync, and rollbacks mean manually reverting each file one by one.
Helm solves all of this. It is the package manager for Kubernetes , the same way
npm manages Node packages or apt manages Ubuntu packages, Helm manages Kubernetes applications as versioned, configurable packages called charts.In this demo, I created a custom Helm chart for Nginx, deployed it on EKS, upgraded it with new configuration, and rolled it back — all through clean, repeatable Helm commands.
What Helm Provides
Without Helm: kubectl apply -f deployment.yaml kubectl apply -f service.yaml kubectl apply -f hpa.yaml kubectl apply -f configmap.yaml (every file managed separately)
With Helm: helm install nginx-release ./nginx-chart (everything deployed in one command)
Upgrade: helm upgrade nginx-release ./nginx-chart --set replicaCount=4
Rollback: helm rollback nginx-release 1Helm Chart Structure
Running
helm create nginx-chart generates a standard chart skeleton:nginx-chart/ ├── Chart.yaml ← chart metadata (name, version, description) ├── values.yaml ← default configuration values └── templates/ ├── deployment.yaml ← uses {{ .Values.x }} for dynamic config ├── service.yaml ├── hpa.yaml └── _helpers.tpl ← reusable template functionsThe power is in the templates — they reference values from
values.yaml using Go template syntax. This means the same chart can deploy to dev with 1 replica and production with 10, just by changing a single value.
Chart.yaml
apiVersion: v2name: nginx-chartdescription: AIOps Demo Nginx Helm Charttype: applicationversion: 1.0.0 # chart version — bump on chart changesappVersion: "1.25.0" # application version being packagedvalues.yaml — The Configuration Layer
replicaCount: 2
image: repository: nginx tag: "1.25-alpine" pullPolicy: IfNotPresent
service: type: LoadBalancer port: 80 annotations: service.beta.kubernetes.io/aws-load-balancer-type: "external" service.beta.kubernetes.io/aws-load-balancer-scheme: "internet-facing"
resources: requests: cpu: "100m" memory: "128Mi" limits: cpu: "200m" memory: "256Mi"
autoscaling: enabled: true minReplicas: 2 maxReplicas: 8 targetCPUUtilizationPercentage: 30Every value here can be overridden at install or upgrade time — no YAML editing required.
Template Example — Deployment

apiVersion: apps/v1kind: Deploymentmetadata: name: {{ include "nginx-chart.fullname" . }} namespace: {{ .Values.namespace }}spec: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} template: spec: containers: - name: {{ .Chart.Name }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" resources: {{- toYaml .Values.resources | nindent 12 }}{{ .Values.image.tag }} pulls from values.yaml . Override it at deploy time and the template renders with the new value — no file editing needed.
Step 1 — Lint Before Deploy
helm lint nginx-chart/# ==> Linting nginx-chart/# 1 chart(s) linted, 0 chart(s) failed ✅Always lint before deploying — catches template errors before they reach the cluster.
Common lint issue encountered:
helm create generates templates for serviceaccount.yaml , ingress.yaml , and httproute.yaml by default, but these reference values.serviceAccount , values.ingress , and values.httpRoute which do not exist in the custom values.yaml . This causes a nil pointer error during lint.Fix: delete the unused templates:
rm nginx-chart/templates/serviceaccount.yamlrm nginx-chart/templates/ingress.yamlrm nginx-chart/templates/httproute.yamlStep 2 — Install
kubectl create namespace helm-demo
helm install nginx-release nginx-chart/ \ --namespace helm-demo
# Verifyhelm list -n helm-demo# NAME NAMESPACE REVISION STATUS CHART# nginx-release helm-demo 1 deployed nginx-chart-1.0.0 ✅
kubectl get all -n helm-demo# Pods, Service, HPA all running ✅Step 3 — Upgrade (Override Values)

# Bump replicas to 4 — no YAML editinghelm upgrade nginx-release nginx-chart/ \ --namespace helm-demo \ --set replicaCount=4
# Upgrade to newer Nginx imagehelm upgrade nginx-release nginx-chart/ \ --namespace helm-demo \ --set image.tag=1.26-alpineEach upgrade creates a new revision tracked by Helm automatically.
Step 4 — History
helm history nginx-release -n helm-demo
# REVISION STATUS CHART DESCRIPTION# 1 superseded nginx-chart-1.0.0 Install complete# 2 superseded nginx-chart-1.0.0 Upgrade complete# 3 deployed nginx-chart-1.0.0 Upgrade completeEvery change is recorded. This is what makes rollbacks reliable.
Step 5 — Rollback

# Roll back to revision 1helm rollback nginx-release 1 -n helm-demo
# Verifyhelm history nginx-release -n helm-demo# REVISION STATUS DESCRIPTION# 1 superseded Install complete# 2 superseded Upgrade complete# 3 superseded Upgrade complete# 4 deployed Rollback to 1 ✅One command. Previous state restored. No manual YAML reverting needed.
Step 6 — Uninstall
helm uninstall nginx-release -n helm-demo# All Kubernetes resources removed ✅# Helm release record removed ✅Helm vs Raw kubectl
Key Lessons
Always lint before install.
helm lint catches template errors locally before they reach your cluster. A failed lint is far less painful than a failed production deployment.helm create generates more than you need. The default skeleton includes ServiceAccount, Ingress, and HTTPRoute templates that reference values not present in the default values.yaml . Delete unused templates or add the corresponding values — otherwise lint will fail with nil pointer errors.Helm tracks every change as a revision. Every install and upgrade is versioned. This is what makes
helm rollback reliable — you are not guessing what the previous state was, Helm knows exactly.--set overrides are powerful but values.yaml files are better for teams. For quick demos, --set image.tag=1.26 works well. In production, maintain separate values-dev.yaml and values-prod.yaml files and deploy with helm install -f values-prod.yaml — this keeps configuration in version control.
Full Source Code
All Helm chart files are available on GitHub:
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article