Nextgen Blog
HomeLearnAIQuantumRoboticsSecuritySpaceAbout
Nextgen Blog

By Anubhav — full stack engineer, IIT Mandi CSE. Deep dives into AI, software engineering, and the technologies shaping the next generation of tech.

Navigate

  • Home
  • Learn
  • Blog
  • Archive
  • About

Topics

  • Artificial Intelligence
  • Quantum Computing
  • Robotics
  • Cybersecurity
  • Space Tech

Connect

Built with ❤️ & By - Anubhav

© 2026 Nextgen Blog by Anubhav. All rights reserved.

Privacy PolicyTerms of Service
Phase 05 · Production & GitOpsChapter 26 of 33
25.
Phase 05Read time ~18 minDifficulty intermediate

Helm ⛵

Warrior, we've reached one of the most important tools you'll encounter in real Kubernetes projects:

In this chapter
  • 01The Problem Helm Solves
  • 02Helm's Basic Idea
  • 03Helm = Package Manager
  • 04Linux
  • 05Node.js
  • 06Python
  • 07Kubernetes
  • 08What Is a Helm Chart?
  • 09Create a Helm Chart
  • 10Chart.yaml
  • 11Chart Version vs Application Version
  • 12Chart version
  • 13Application version
  • 14values.yaml
  • 15Templates
  • 16Template Example
  • 17How Helm Processes This
  • 18Helm Isn't Replacing Kubernetes
  • 19Installing a Chart
  • 20What Is a Release?
  • 21List Releases
  • 22Install into Namespace
  • 23Upgrade
  • 24Upgrade With Different Values
  • 25Different Environments
  • 26values-dev.yaml
  • 27values-prod.yaml
  • 28Multiple Values Files
  • 29Helm --set
  • 30Inspect Rendered YAML
  • 31Debug Template Rendering
  • 32Dry Run
  • 33Helm Rollback
  • 34Helm History
  • 35Helm vs kubectl rollout undo
  • 36Kubernetes Deployment rollback
  • 37Helm rollback
  • 38Helm Uninstall
  • 39Helm Template Syntax
  • 40.Values
  • 41if Conditions
  • 42Why if Is Useful
  • 43with
  • 44range
  • 45Named Templates
  • 46include
  • 47Helm Functions
  • 48default
  • 49required
  • 50toYaml
  • 51A Practical Node.js Helm Chart
  • 52Chart.yaml
  • 53values.yaml
  • 54deployment.yaml
  • 55service.yaml
  • 56ingress.yaml
  • 57Render the Chart
  • 58Install
  • 59Upgrade Application
  • 60Helm + Production Environments
  • 61Development
  • 62Production
  • 63Helm Dependencies
  • 64Helm Repository
  • 65Helm Chart vs Docker Image
  • 66Docker Image
  • 67Helm Chart
  • 68Helm vs Raw YAML
  • 69Raw YAML
  • 70Helm
  • 71Helm vs Kustomize
  • 72Helm
  • 73Kustomize
  • 74Helm Security — Important
  • 75Helm Debugging
  • 76Helm Release Lifecycle
  • 77Important Helm Commands
  • 78Version
  • 79Create chart
  • 80List releases
  • 81All namespaces
  • 82Install
  • 83Upgrade
  • 84Upgrade or install
  • 85Render
  • 86Dry run
  • 87Status
  • 88History
  • 89Rollback
  • 90Uninstall
  • 91Package
  • 92Interview Questions 🎯
  • 93Q1. What is Helm?
  • 94Q2. What is a Helm Chart?
  • 95Q3. What is values.yaml?
  • 96Q4. What is a Helm Release?
  • 97Q5. What does .Values mean?
  • 98Q6. How do you render a Helm chart without installing it?
  • 99Q7. How do you upgrade a Helm release?
  • 100Q8. How do you rollback?
  • 101Q9. Helm vs Kubernetes?
  • 102Q10. Helm vs Docker?
  • 103Q11. Helm vs Kustomize?
  • 104Q12. Why use immutable image tags?
  • 105Chapter 25 Cheat Sheet 🧠
  • 106Next → Chapter 26: Kustomize 🧩
In this chapter (106 sections)
01The Problem Helm Solves02Helm's Basic Idea03Helm = Package Manager04Linux05Node.js06Python07Kubernetes08What Is a Helm Chart?09Create a Helm Chart10Chart.yaml11Chart Version vs Application Version12Chart version13Application version14values.yaml15Templates16Template Example17How Helm Processes This18Helm Isn't Replacing Kubernetes19Installing a Chart20What Is a Release?21List Releases22Install into Namespace23Upgrade24Upgrade With Different Values25Different Environments26values-dev.yaml27values-prod.yaml28Multiple Values Files29Helm --set30Inspect Rendered YAML31Debug Template Rendering32Dry Run33Helm Rollback34Helm History35Helm vs kubectl rollout undo36Kubernetes Deployment rollback37Helm rollback38Helm Uninstall39Helm Template Syntax40.Values41if Conditions42Why if Is Useful43with44range45Named Templates46include47Helm Functions48default49required50toYaml51A Practical Node.js Helm Chart52Chart.yaml53values.yaml54deployment.yaml55service.yaml56ingress.yaml57Render the Chart58Install59Upgrade Application60Helm + Production Environments61Development62Production63Helm Dependencies64Helm Repository65Helm Chart vs Docker Image66Docker Image67Helm Chart68Helm vs Raw YAML69Raw YAML70Helm71Helm vs Kustomize72Helm73Kustomize74Helm Security — Important75Helm Debugging76Helm Release Lifecycle77Important Helm Commands78Version79Create chart80List releases81All namespaces82Install83Upgrade84Upgrade or install85Render86Dry run87Status88History89Rollback90Uninstall91Package92Interview Questions 🎯93Q1. What is Helm?94Q2. What is a Helm Chart?95Q3. What is values.yaml?96Q4. What is a Helm Release?97Q5. What does .Values mean?98Q6. How do you render a Helm chart without installing it?99Q7. How do you upgrade a Helm release?100Q8. How do you rollback?101Q9. Helm vs Kubernetes?102Q10. Helm vs Docker?103Q11. Helm vs Kustomize?104Q12. Why use immutable image tags?105Chapter 25 Cheat Sheet 🧠106Next → Chapter 26: Kustomize 🧩

Helm — the package manager for Kubernetes.

So far, we've been writing Kubernetes YAML manually.

That works for learning.

But imagine your production application has:

  • 3 Deployments
  • 5 Services
  • 2 ConfigMaps
  • 4 Secrets
  • 2 Ingresses
  • HPA
  • ServiceAccount
  • RBAC
  • NetworkPolicies
  • PVCs

You could easily end up with dozens of YAML files.

Helm helps turn all of that into a reusable, configurable package.


1. The Problem Helm Solves#

Imagine your Node.js application has this Deployment:

apiVersion: apps/v1
kind: Deployment
 
metadata:
  name: node-api
 
spec:
  replicas: 3
 
  template:
    spec:
      containers:
        - name: node-api
          image: node-api:1.0.0
          ports:
            - containerPort: 3000

Now you need:

Development
Staging
Production

Development:

replicas: 1
image: node-api:1.0.0

Staging:

replicas: 2
image: node-api:1.2.0

Production:

replicas: 10
image: node-api:2.0.0

Without templating, you might maintain separate YAML files:

deployment-dev.yaml
deployment-staging.yaml
deployment-prod.yaml

Now imagine 20 Kubernetes resources.

This becomes difficult to maintain.


2. Helm's Basic Idea#

Instead of:

YAML
YAML
YAML
YAML
YAML

you create:

Helm Chart
    │
    ├── Templates
    ├── Configuration
    └── Metadata

Then:

values.yaml
     ↓
Helm templates
     ↓
Kubernetes YAML
     ↓
Kubernetes API

3. Helm = Package Manager#

A simple analogy:

Linux#

apt install nginx

Node.js#

npm install express

Python#

pip install django

Kubernetes#

helm install

Helm packages Kubernetes resources into a reusable unit called a:

Chart


4. What Is a Helm Chart?#

A Helm Chart is a directory containing:

templates
configuration
metadata

Example:

node-api-chart/
│
├── Chart.yaml
├── values.yaml
│
└── templates/
    ├── deployment.yaml
    ├── service.yaml
    ├── ingress.yaml
    ├── configmap.yaml
    └── _helpers.tpl

5. Create a Helm Chart#

First verify Helm:

helm version

Create a chart:

helm create node-api

Helm generates a structure similar to:

node-api/
├── Chart.yaml
├── values.yaml
├── charts/
├── templates/
│   ├── deployment.yaml
│   ├── service.yaml
│   ├── ingress.yaml
│   ├── hpa.yaml
│   ├── serviceaccount.yaml
│   ├── _helpers.tpl
│   └── tests/
└── .helmignore

The generated chart contains a lot of examples.

For learning, we'll simplify it.


6. Chart.yaml#

This file contains chart metadata.

Example:

apiVersion: v2
 
name: node-api
 
description: Helm chart for Node.js API
 
type: application
 
version: 1.0.0
 
appVersion: "2.1.0"

Important fields:

Field Meaning
apiVersion Helm chart API version
name Chart name
description Description
type application/library
version Chart version
appVersion Application version

7. Chart Version vs Application Version#

This confuses beginners.

Suppose:

version: 1.3.0
appVersion: "2.5.0"

They mean different things.

Chart version#

1.3.0

means:

Version of the Helm packaging/templates.

Application version#

2.5.0

means:

Version of the application being deployed.

They don't have to be identical.


8. values.yaml#

This is one of the most important Helm files.

Example:

replicaCount: 3
 
image:
  repository: myregistry/node-api
  tag: "2.1.0"
  pullPolicy: IfNotPresent
 
service:
  type: ClusterIP
  port: 80
 
containerPort: 3000
 
resources:
  requests:
    cpu: "250m"
    memory: "256Mi"
 
  limits:
    cpu: "500m"
    memory: "512Mi"

Think:

values.yaml = configuration.


9. Templates#

Now you create:

templates/deployment.yaml

Instead of hardcoding:

replicas: 3

you write:

replicas: {{ .Values.replicaCount }}

Instead of:

image: myregistry/node-api:2.1.0

you can write:

image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Helm substitutes the values when rendering the chart.


10. Template Example#

apiVersion: apps/v1
kind: Deployment
 
metadata:
  name: {{ include "node-api.fullname" . }}
 
spec:
  replicas: {{ .Values.replicaCount }}
 
  selector:
    matchLabels:
      app: {{ include "node-api.name" . }}
 
  template:
    metadata:
      labels:
        app: {{ include "node-api.name" . }}
 
    spec:
      containers:
        - name: node-api
 
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
 
          ports:
            - containerPort: {{ .Values.containerPort }}
 
          resources:
            {{- toYaml .Values.resources | nindent 12 }}

Now the same template can deploy different configurations.


11. How Helm Processes This#

Suppose:

replicaCount: 5
 
image:
  repository: myregistry/node-api
  tag: "3.0.0"
 
containerPort: 3000

Helm renders:

replicas: 5
 
image: myregistry/node-api:3.0.0
 
containerPort: 3000

Then Kubernetes receives the rendered manifests.

Conceptually:

values.yaml
     ↓
Helm Template Engine
     ↓
Rendered YAML
     ↓
Kubernetes API

12. Helm Isn't Replacing Kubernetes#

This is important.

Helm doesn't run Pods.

Helm doesn't replace Kubernetes.

Instead:

Helm
 ↓
Generates/manages Kubernetes manifests/releases
 ↓
Kubernetes
 ↓
Runs application

Think:

Helm = packaging + templating + release management
Kubernetes = orchestration

13. Installing a Chart#

Suppose:

node-api/

is your chart.

Install:

helm install node-api ./node-api

Here:

node-api

is the release name.

And:

./node-api

is the chart.


14. What Is a Release?#

A release is a deployed instance of a Helm chart.

Imagine:

Chart:
node-api

You could install it multiple times:

node-api-dev
node-api-staging
node-api-prod

Each is a separate Helm release.

             node-api Chart
                   │
       ┌───────────┼───────────┐
       ↓           ↓           ↓
     Dev         Staging      Prod
   Release       Release     Release

15. List Releases#

helm list

Example:

NAME            NAMESPACE   STATUS
node-api        default     deployed
frontend        default     deployed

Across namespaces:

helm list -A

16. Install into Namespace#

helm install node-api ./node-api \
  --namespace production \
  --create-namespace

Now:

Release:
node-api
 
Namespace:
production

17. Upgrade#

Suppose your application changes from:

2.1.0

to:

2.2.0

Update:

image:
  tag: "2.2.0"

Then:

helm upgrade node-api ./node-api

Helm updates the release.


18. Upgrade With Different Values#

You can override values from the command line.

For example:

helm upgrade node-api ./node-api \
  --set image.tag=2.2.0

This means:

values.yaml
     ↓
override image.tag
     ↓
2.2.0

19. Different Environments#

This is where Helm becomes really useful.

You could have:

values.yaml
values-dev.yaml
values-staging.yaml
values-prod.yaml

Example:

values-dev.yaml#

replicaCount: 1
 
image:
  tag: "2.2.0"
 
resources:
  requests:
    cpu: "100m"
    memory: "128Mi"

values-prod.yaml#

replicaCount: 5
 
image:
  tag: "2.2.0"
 
resources:
  requests:
    cpu: "500m"
    memory: "512Mi"

Then:

helm install node-api ./node-api \
  -f values-dev.yaml

Production:

helm install node-api ./node-api \
  -f values-prod.yaml

20. Multiple Values Files#

You can layer values:

helm upgrade node-api ./node-api \
  -f values.yaml \
  -f values-prod.yaml

Later values generally override earlier values for overlapping keys.

Conceptually:

values.yaml
     ↓
values-prod.yaml
     ↓
Final configuration

21. Helm --set#

You can also override individual values:

helm upgrade node-api ./node-api \
  -f values-prod.yaml \
  --set image.tag=2.3.0

This is useful for CI/CD pipelines.


22. Inspect Rendered YAML#

One of the most useful Helm commands:

helm template node-api ./node-api

This renders the templates locally.

It does not install the chart.

Think:

Chart
 ↓
helm template
 ↓
Generated Kubernetes YAML

This is extremely useful for debugging templates.


23. Debug Template Rendering#

You can use:

helm template node-api ./node-api --debug

If your template has:

replicas: {{ .Values.replicaCount }}

you can verify the actual generated YAML before deploying.


24. Dry Run#

Another useful command:

helm install node-api ./node-api --dry-run

This lets you inspect what Helm would attempt to install without actually performing the deployment.

For upgrade:

helm upgrade node-api ./node-api --dry-run

Exact output can include rendered manifests and validation information depending on the command/options.


25. Helm Rollback#

This is another powerful feature.

Suppose:

Release revision 1 → working
Release revision 2 → working
Release revision 3 → broken

Check:

helm history node-api

Example:

REVISION   STATUS
1          superseded
2          superseded
3          deployed

Rollback:

helm rollback node-api 2

Now Helm attempts to restore revision 2.


26. Helm History#

helm history node-api

You may see:

REVISION   UPDATED                  STATUS
1          ...                      superseded
2          ...                      superseded
3          ...                      deployed

This gives you release history.


27. Helm vs kubectl rollout undo#

These are related but not identical.

Kubernetes Deployment rollback#

kubectl rollout undo deployment/node-api

Works at the Kubernetes Deployment level.

Helm rollback#

helm rollback node-api 2

Rolls back the Helm release configuration/revision.

If your Helm chart manages a Deployment, Helm will render/apply the older release state.

Think:

kubectl rollout undo
→ Deployment-level rollback
 
helm rollback
→ Helm release-level rollback

28. Helm Uninstall#

Remove a Helm release:

helm uninstall node-api

This removes resources managed by that release according to Helm's behavior.

Check:

helm list

29. Helm Template Syntax#

Helm uses the Go template language.

The basic syntax is:

{{ ... }}

Example:

replicas: {{ .Values.replicaCount }}

30. .Values#

This is one of the most important Helm concepts.

Suppose:

## values.yaml
 
replicaCount: 3

Template:

replicas: {{ .Values.replicaCount }}

Result:

replicas: 3

Nested:

image:
  repository: myregistry/node-api
  tag: "2.0.0"

Template:

image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

Result:

myregistry/node-api:2.0.0

31. if Conditions#

You can conditionally create resources.

Values:

ingress:
  enabled: true

Template:

{{- if .Values.ingress.enabled }}
 
apiVersion: networking.k8s.io/v1
kind: Ingress
 
...
 
{{- end }}

If:

enabled: true

the resource is generated.

If:

enabled: false

it isn't.


32. Why if Is Useful#

Development:

ingress:
  enabled: false

Production:

ingress:
  enabled: true

Same chart.

Different configuration.

                 Same Chart
                     │
          ┌──────────┴──────────┐
          ↓                     ↓
         Dev                   Prod
      Ingress OFF            Ingress ON

33. with#

Helm has with for changing the current context.

For example:

{{- with .Values.image }}
repository: {{ .repository }}
tag: {{ .tag }}
{{- end }}

Instead of repeatedly writing:

.Values.image.repository
.Values.image.tag

Inside with, . refers to .Values.image.


34. range#

range is useful for lists.

Values:

env:
  - name: NODE_ENV
    value: production
 
  - name: LOG_LEVEL
    value: info

Template:

env:
{{- range .Values.env }}
  - name: {{ .name }}
    value: {{ .value | quote }}
{{- end }}

Result:

env:
  - name: NODE_ENV
    value: "production"
 
  - name: LOG_LEVEL
    value: "info"

35. Named Templates#

Helm supports reusable template helpers.

File:

templates/_helpers.tpl

Example:

{{- define "node-api.name" -}}
node-api
{{- end -}}

Then:

name: {{ include "node-api.name" . }}

This avoids repeating naming logic.


36. include#

Example:

{{ include "node-api.fullname" . }}

This allows reusable helper templates.

Common Helm charts use helpers for:

name
fullname
labels
selectorLabels
serviceAccountName

37. Helm Functions#

Helm provides many template functions.

Common ones include:

quote
default
toYaml
nindent
include
required
upper
lower
trim

Example:

image: {{ .Values.image.repository | quote }}

38. default#

Suppose:

service:
  type: ""

You can use:

{{ .Values.service.type | default "ClusterIP" }}

If no value is supplied:

ClusterIP

is used.


39. required#

Suppose production requires a database URL.

You can write:

{{ required "database.url is required" .Values.database.url }}

If missing:

Helm rendering fails

This is much better than deploying a broken configuration.


40. toYaml#

Suppose:

resources:
  requests:
    cpu: "250m"
    memory: "256Mi"

You can render:

{{- toYaml .Values.resources | nindent 12 }}

This converts the object into YAML with proper indentation.

This pattern appears frequently in real Helm charts.


41. A Practical Node.js Helm Chart#

Let's build a simplified chart:

node-api/
├── Chart.yaml
├── values.yaml
└── templates/
    ├── deployment.yaml
    ├── service.yaml
    └── ingress.yaml

42. Chart.yaml#

apiVersion: v2
 
name: node-api
 
description: Node.js API Helm chart
 
type: application
 
version: 1.0.0
 
appVersion: "2.1.0"

43. values.yaml#

replicaCount: 3
 
image:
  repository: myregistry/node-api
  tag: "2.1.0"
  pullPolicy: IfNotPresent
 
containerPort: 3000
 
service:
  type: ClusterIP
  port: 80
 
ingress:
  enabled: true
  className: nginx
  host: api.example.com
 
resources:
  requests:
    cpu: "250m"
    memory: "256Mi"
 
  limits:
    cpu: "500m"
    memory: "512Mi"

44. deployment.yaml#

apiVersion: apps/v1
kind: Deployment
 
metadata:
  name: node-api
 
spec:
  replicas: {{ .Values.replicaCount }}
 
  selector:
    matchLabels:
      app: node-api
 
  template:
    metadata:
      labels:
        app: node-api
 
    spec:
      containers:
        - name: node-api
 
          image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
 
          imagePullPolicy: {{ .Values.image.pullPolicy }}
 
          ports:
            - name: http
              containerPort: {{ .Values.containerPort }}
 
          resources:
            {{- toYaml .Values.resources | nindent 12 }}

45. service.yaml#

apiVersion: v1
kind: Service
 
metadata:
  name: node-api
 
spec:
  type: {{ .Values.service.type }}
 
  selector:
    app: node-api
 
  ports:
    - name: http
      port: {{ .Values.service.port }}
      targetPort: {{ .Values.containerPort }}

Notice:

Service port
    ↓
Values

and:

Target port
    ↓
Node.js container port

46. ingress.yaml#

{{- if .Values.ingress.enabled }}
 
apiVersion: networking.k8s.io/v1
kind: Ingress
 
metadata:
  name: node-api
 
spec:
  ingressClassName: {{ .Values.ingress.className }}
 
  rules:
    - host: {{ .Values.ingress.host }}
 
      http:
        paths:
          - path: /
            pathType: Prefix
 
            backend:
              service:
                name: node-api
                port:
                  number: {{ .Values.service.port }}
 
{{- end }}

Now:

ingress:
  enabled: false

means:

Don't render the Ingress.


47. Render the Chart#

Run:

helm template node-api ./node-api

You'll see generated Kubernetes YAML.

This is an excellent learning exercise.

Try changing:

replicaCount: 5

Then:

helm template node-api ./node-api

You'll see:

replicas: 5

48. Install#

helm install node-api ./node-api

Then:

kubectl get pods

You should see something like:

node-api-xxxxx
node-api-yyyyy
node-api-zzzzz

49. Upgrade Application#

Change:

image:
  tag: "2.2.0"

Then:

helm upgrade node-api ./node-api

Kubernetes performs the Deployment rollout.

So:

Helm
 ↓
Rendered YAML
 ↓
Deployment changes
 ↓
Rolling Update
 ↓
New Pods

This connects Chapter 24 directly with Helm.


50. Helm + Production Environments#

A realistic repository might look like:

helm/
└── node-api/
    ├── Chart.yaml
    ├── values.yaml
    ├── values-dev.yaml
    ├── values-staging.yaml
    ├── values-prod.yaml
    │
    └── templates/
        ├── deployment.yaml
        ├── service.yaml
        ├── ingress.yaml
        ├── hpa.yaml
        ├── configmap.yaml
        ├── serviceaccount.yaml
        └── _helpers.tpl

Then:

Development#

helm upgrade --install node-api ./helm/node-api \
  -f ./helm/node-api/values-dev.yaml

Production#

helm upgrade --install node-api ./helm/node-api \
  -f ./helm/node-api/values-prod.yaml

upgrade --install means:

Upgrade if the release exists; otherwise install it.

This is very common in deployment automation.


51. Helm Dependencies#

A Helm chart can depend on other charts.

For example:

My Application
     │
     ├── PostgreSQL
     ├── Redis
     └── Other dependency

You can declare dependencies in Chart.yaml.

Conceptually:

dependencies:
  - name: redis
    version: "..."
    repository: "..."

Then Helm can manage chart dependencies.

However, production teams often choose managed cloud databases/caches instead of running every stateful dependency inside the same application chart.


52. Helm Repository#

Charts can be packaged and distributed.

Example:

helm package node-api

This can produce:

node-api-1.0.0.tgz

A chart repository can then distribute charts to teams.

Conceptually:

Chart
 ↓
Package
 ↓
Chart Repository
 ↓
helm install

53. Helm Chart vs Docker Image#

Don't confuse these.

Docker Image#

Contains your application:

Node.js
+
Application code
+
Dependencies

Example:

node-api:2.1.0

Helm Chart#

Contains Kubernetes deployment configuration:

Deployment
Service
Ingress
HPA
ConfigMap
RBAC
etc.

Example:

node-api-chart:1.0.0

So:

Docker Image → Application
Helm Chart   → How Kubernetes deploys the application

54. Helm vs Raw YAML#

Raw YAML#

deployment.yaml
service.yaml
ingress.yaml
hpa.yaml
...

Advantages:

  • simple
  • transparent
  • native Kubernetes
  • easy to start with

Disadvantages:

  • repetition
  • environment duplication
  • difficult parameterization

Helm#

Advantages:

  • templates
  • variables
  • reusable charts
  • release management
  • versioned packaging

Disadvantages:

  • template complexity
  • debugging can be harder
  • Helm syntax must be learned

55. Helm vs Kustomize#

You'll learn Kustomize in Chapter 26.

For now:

Helm#

Templates
+
Values

Kustomize#

Base YAML
+
Overlays / patches

Think:

Helm
→ Template-based packaging
 
Kustomize
→ Overlay-based customization

Neither is universally superior.


56. Helm Security — Important#

Don't put plaintext production secrets into:

values-prod.yaml

For example, avoid:

databasePassword: SuperSecret123

in Git.

Helm templates can reference Kubernetes Secrets, but you still need a secure strategy for supplying secret values.

Common production approaches include:

External Secrets
Cloud secret managers
Vault
Sealed Secrets
CI/CD secret injection

We'll revisit security patterns when connecting Helm with CI/CD.


57. Helm Debugging#

Suppose deployment failed.

Start:

helm list

Then:

helm status node-api

Render locally:

helm template node-api ./node-api

Debug rendering:

helm template node-api ./node-api --debug

Then inspect Kubernetes:

kubectl get pods
kubectl describe pod <pod>
kubectl logs <pod>

Remember:

Helm problems and Kubernetes problems can be different.

For example:

Helm renders invalid YAML
        ↓
Kubernetes rejects it

or:

Helm succeeds
        ↓
Deployment created
        ↓
Pod crashes

In the second case, Helm worked; the application/Kubernetes workload has a problem.


58. Helm Release Lifecycle#

A useful mental model:

helm install
      ↓
Release revision 1
      ↓
helm upgrade
      ↓
Revision 2
      ↓
helm upgrade
      ↓
Revision 3
      ↓
Problem
      ↓
helm rollback
      ↓
Revision restored

So Helm tracks release history.


59. Important Helm Commands#

Version#

helm version

Create chart#

helm create node-api

List releases#

helm list

All namespaces#

helm list -A

Install#

helm install node-api ./node-api

Upgrade#

helm upgrade node-api ./node-api

Upgrade or install#

helm upgrade --install node-api ./node-api

Render#

helm template node-api ./node-api

Dry run#

helm install node-api ./node-api --dry-run

Status#

helm status node-api

History#

helm history node-api

Rollback#

helm rollback node-api 2

Uninstall#

helm uninstall node-api

Package#

helm package ./node-api

60. Interview Questions 🎯#

Q1. What is Helm?#

Helm is a package manager and release-management tool for Kubernetes that uses charts and templates to package and deploy Kubernetes resources.


Q2. What is a Helm Chart?#

A reusable package containing Kubernetes templates, configuration, and metadata.


Q3. What is values.yaml?#

The default configuration values used by Helm templates.


Q4. What is a Helm Release?#

A deployed instance of a Helm chart.


Q5. What does .Values mean?#

It accesses values supplied to the Helm template system.

Example:

{{ .Values.replicaCount }}

Q6. How do you render a Helm chart without installing it?#

helm template node-api ./node-api

Q7. How do you upgrade a Helm release?#

helm upgrade node-api ./node-api

Q8. How do you rollback?#

helm rollback node-api <revision>

Q9. Helm vs Kubernetes?#

Helm → package/template/release management
Kubernetes → orchestration/runtime

Q10. Helm vs Docker?#

Docker image → application package
Helm chart → Kubernetes deployment package

Q11. Helm vs Kustomize?#

Helm → templates + values
Kustomize → bases + overlays/patches

Q12. Why use immutable image tags?#

To make deployments reproducible and rollback/version identification predictable.


61. Chapter 25 Cheat Sheet 🧠#

The most important structure:

node-api/
│
├── Chart.yaml
│       ↓
│    Metadata
│
├── values.yaml
│       ↓
│    Configuration
│
└── templates/
        ↓
     Kubernetes templates

The flow:

values.yaml
     +
templates
     ↓
   Helm
     ↓
Rendered YAML
     ↓
Kubernetes
     ↓
Deployment
     ↓
Pods

Commands:

helm create node-api
 
helm install node-api ./node-api
 
helm upgrade node-api ./node-api
 
helm upgrade --install node-api ./node-api
 
helm template node-api ./node-api
 
helm status node-api
 
helm history node-api
 
helm rollback node-api 2
 
helm uninstall node-api

🔥 The Mental Model You Should Remember#

Without Helm:

Dev YAML
Staging YAML
Production YAML
     ↓
Lots of duplication

With Helm:

             Helm Chart
                 │
        ┌────────┼────────┐
        ↓        ↓        ↓
       Dev    Staging    Prod
        │        │        │
    values    values    values
        │        │        │
        └────────┼────────┘
                 ↓
          Kubernetes YAML
                 ↓
             Kubernetes

And the complete production chain is now:

Code
 ↓
Docker Image
 ↓
Helm Chart
 ↓
Helm Release
 ↓
Deployment
 ↓
ReplicaSet
 ↓
Pods
 ↓
Service
 ↓
Ingress
 ↓
Users

You've now learned enough Kubernetes fundamentals that Helm is no longer just a separate tool—it fits directly into the deployment architecture we've been building throughout this course.


Next → Chapter 26: Kustomize 🧩#

We'll learn the other major Kubernetes configuration tool:

  • What problem Kustomize solves
  • Base + Overlay architecture
  • kustomization.yaml
  • Patches
  • ConfigMap generation
  • Secret generation
  • Dev/Staging/Production overlays
  • kubectl apply -k
  • Helm vs Kustomize
  • When to use each
  • A practical Node.js application with Dev/Staging/Production overlays.

Finished this chapter?

Mark it as complete to track your mastery.

Previous ChapterChapter 24 — Rolling Updates & Rollbacks 🚀Next ChapterChapter 26 — Kustomize 🧩
PrevNext