Understanding Helm: Benefits, Core Concepts, and Using Helm with Docker and Nexus for CI/CD
This article explains why Helm is essential for managing Kubernetes applications, describes its core concepts of charts, releases, and repositories, and provides a step‑by‑step guide to integrating Helm with Docker and Sonatype Nexus in a CI/CD pipeline, including practical commands and code examples.
Why Use Helm?
Helm makes templated applications easy
Helm allows you to create a generic chart with variables, enabling the deployment of multiple instances from a single template instead of duplicating YAML manifests.
Helm enables version control for Kubernetes applications
By packaging applications into Helm charts, you can store multiple chart versions in a Helm repository, allowing quick releases, rollbacks, and semantic versioning of Kubernetes manifests.
Helm facilitates reuse and sharing
Public Helm repositories let you share Kubernetes applications similarly to Docker Hub, providing standard charts that vendors and consumers can reuse.
Helm simplifies deployment
Simple commands such as helm install and helm uninstall replace complex kubectl workflows, making installation and removal straightforward.
Helm supports dependency management
For example, a LAMP stack chart can declare a MySQL dependency, ensuring Apache is only installed when MySQL is available.
Helm enforces standards
Chart developers start from standard templates, producing high‑quality manifests that serve as learning material for developers.
Helm’s Three Core Concepts
Helm charts
A chart is a packaged collection of Kubernetes manifests, similar to an RPM or DEB, containing versioned templates and dependencies.
Helm release
A release is an instance of a chart deployed in a Kubernetes cluster; the same chart can produce multiple releases.
Helm repo
A Helm repository stores charts like a YUM repo stores RPMs; anyone can download charts with simple Helm commands.
Typical repository layout:
charts/
|
|- index.yaml
|- alpine-0.1.2.tgz
|- alpine-0.1.2.tgz.provCI/CD with Docker and Helm
A typical pipeline creates Docker images and Helm charts, pushes them to a Sonatype Nexus repository, updates the Helm repo index, and runs helm upgrade --install to deploy or upgrade the application in Kubernetes.
Hosting a Helm Repository on Sonatype Nexus
Nexus supports multiple repository types (Maven, YUM, Docker, etc.) and can host Helm charts via the built‑in Helm format (Nexus 3.21+) or the nexus-repository-helm plugin for older versions.
Adding the Nexus Helm repo
# helm repo add nexus http://admin:[email protected]:8081/repository/myhelm/
"nexus" has been added to your repositories
# helm repo list
NAME URL
stable http://mirror.azure.cn/kubernetes/charts/
gitlab https://charts.gitlab.io
mattermost https://helm.mattermost.com
nexus http://admin:[email protected]:8081/repository/myhelm/Packaging and uploading a chart
# helm package ./gitlab-runner
Successfully packaged chart and saved it to: /root/new-k8s-runner/custom-gitlab-runner-0.15.0.tgz curl -v -F [email protected] -u admin:admin123 http://192.168.1.200:8081/service/rest/v1/components?repository=myhelmInstalling the chart from Nexus
# helm repo update
# helm search repo -l custom-gitlab-runner
NAME CHART VERSION APP VERSION DESCRIPTION
nexus/custom-gitlab-runner 0.15.0 12.9.0 GitLab Runner
# helm fetch nexus/custom-gitlab-runner --version 0.15.0After updating the index, helm install pulls the chart from Nexus and deploys it to the Kubernetes cluster.
DevOps Cloud Academy
Exploring industry DevOps practices and technical expertise.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.