Helm is a package manager for Kubernetes, often described as the Kubernetes equivalent of APT for Debian or YUM for CentOS. It helps you define, install, and manage Kubernetes applications using a packaging format called Charts.

  • Helm Charts: A Helm Chart is a packaged collection of Kubernetes YAML manifests (Deployment, Service, ConfigMap, etc.) combined with configuration and templating files. It defines a Kubernetes application, including all of its components and configurations, in a reusable, version-controlled format.
  • You can think of a Helm chart as a "blueprint" for deploying an application on Kubernetes.
  • Helm simplifies deployment by enabling you to install a whole set of Kubernetes resources with a single command, helm install.

Want to read this on Medium? Use this friend link for free access: Read on Medium

Kubernetes series — Part 1 — Key Concepts Every Beginner Must Know Part 2 — Getting Started with Helm Charts Part 3 — Mastering Services for Pod Networking Part 4 — Managing Traffic with Ingress Controllers Part 5 — Managing ConfigMaps and Secrets Part 6 — Scaling Applications with Deployments and ReplicaSets Part 7 — Managing Stateful Applications with StatefulSets Part 8 — Managing Batch Workloads with Jobs and CronJobs Part 9 — Understanding DaemonSets for Node-Level Deployments

Why Use Helm?

  1. Simplifies Complex Deployments: Helm allows you to deploy multiple Kubernetes resources in one step (instead of kubectl apply for each YAML).
  2. Reusable & Shareable: Charts can be reused across environments (dev, staging, prod) and shared with teams or the community (via Helm repositories).
  3. Configuration Management: Helm uses templating and a values file (values.yaml) to make deployments configurable without editing multiple YAMLs manually.
  4. Version Control: Helm charts are versioned, making rollback and upgrade of applications easier (helm rollback, helm upgrade).
  5. Release Management: Helm tracks releases, so you know what's deployed and can manage lifecycles cleanly.

Sure! Here's a polished rephrased version of your content:

How Helm Works

Helm streamlines Kubernetes application management by using charts to define, install, and upgrade resources. Instead of manually writing and applying Kubernetes manifests with kubectl, Helm enables you to manage these configurations more efficiently, eliminating the need to remember complex Kubernetes commands.

A Practical Example:

Imagine deploying an application to a production environment where you need 10 replicas. You would typically specify this in your deployment YAML file and apply it using kubectl.

Now, let's say you want to deploy the same application to a staging environment, but with 3 replicas and a different Docker image tag (e.g., an internal build). This requires modifying the replica count and image tag directly in your deployment YAML, then applying the updated file to your staging cluster.

As your application grows and becomes more complex, the number of YAML files — and the number of configurable parameters — will grow significantly. Manually editing these files across multiple environments (dev, staging, production) quickly becomes cumbersome and error-prone.

Enter Helm & values.yaml

With Helm, you can parameterize your deployment templates. Instead of hardcoding values like replica counts and image tags, you reference variables sourced from a separate configuration file called values.yaml.

You can maintain a dedicated values.yaml file for each environment (e.g., values-dev.yaml, values-prod.yaml), each containing environment-specific values. Helm then dynamically injects these values into your Kubernetes manifests during deployment.

None
Helm Chart Deployment Process

Explanation :

  • Templates: The core Helm chart contains generic Kubernetes manifests (e.g., Deployment, Service).
  • Values Files: Each environment (dev, staging, prod) provides its own values.yaml with specific configurations (replicas, image tags, etc.).
  • Helm Render: Helm merges templates with values, generating ready-to-apply Kubernetes manifests.
  • Multi-Env Deployments: You can deploy to any environment by simply switching the values file.

How to create Helm Chart -

Simple Java App Example

Let's assume you have a basic Spring Boot Java app packaged as a Docker image.

For this example:

  • Image: myrepo/hello-java:1.0.0
  • The app runs on port 8080

Step 1: Helm Chart Setup

helm create hello-java

Step 2: Minimal values.yaml

replicaCount: 1
image:
  repository: myrepo/hello-java
  tag: "1.0.0"
  pullPolicy: IfNotPresent
service:
  type: ClusterIP
  port: 8080

Step 3: Minimal deployment.yaml

hello-java/templates/deployment.yaml:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ .Release.Name }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      app: {{ .Release.Name }}
  template:
    metadata:
      labels:
        app: {{ .Release.Name }}
    spec:
      containers:
      - name: hello-java
        image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
        imagePullPolicy: {{ .Values.image.pullPolicy }}
        ports:
        - containerPort: 8080

Step 4: Minimal service.yaml

hello-java/templates/service.yaml:

apiVersion: v1
kind: Service
metadata:
  name: {{ .Release.Name }}
spec:
  type: {{ .Values.service.type }}
  selector:
    app: {{ .Release.Name }}
  ports:
  - port: {{ .Values.service.port }}
    targetPort: 8080

Step 5: Render Helm Templates Before Deploy

helm template hello-java ./hello-java

This command lets you preview what Kubernetes YAML Helm will generate before applying it to the cluster.

Step 6: Install to Kubernetes

helm install hello-java ./hello-java

Your Spring Boot app is now running inside Kubernetes via Helm!

Optional Override

You can override values inline like this:

helm install hello-java ./hello-java --set replicaCount=3 --set image.tag=1.1.0

Helm Lifecycle: Upgrade, Rollback & Debug

Upgrade

You can upgrade the deployment (e.g., to a new image version) with:

helm upgrade hello-java ./hello-java --set image.tag=1.1.0

Rollback

If something goes wrong, you can roll back to the previous release:

helm rollback hello-java 1

Debug Helm Charts

Before deploying, it's good practice to verify your Helm templates:

helm lint ./hello-java         # Lint your chart
helm template ./hello-java     # Render templates locally

Key Takeaways

  • Helm acts as a package manager for Kubernetes. It simplifies the process of installing and managing applications on Kubernetes, similar to how APT or YUM works on Linux systems.
  • Helm Charts serve as blueprints for Kubernetes applications. A chart bundles all the necessary Kubernetes resources into one package, making it easy to deploy an application.
  • Templates become flexible with a values.yaml file. Instead of hardcoding configuration values like replica counts or image tags, these values can be set externally in a values file and adjusted for different environments such as dev, staging, or production.
  • Simplifies deployments across multiple environments. The same chart can be reused across different environments by simply swapping the values file, reducing the need to maintain multiple versions of the same YAML configurations.
  • Helm provides easy lifecycle management. Applications can be installed, upgraded, or rolled back using simple Helm commands, improving release management and minimizing deployment risks.