Skip to main content

Command Palette

Search for a command to run...

What is HELM?

Updated
β€’4 min read
What is HELM?
S

πŸ‘‹Hello, Hashnode community! I'm subbaramireddy, a passionate DevOps Engineer with a relentless commitment to optimizing software development workflows and infrastructure management. πŸš€ Hands-on experience in the DevOps field, I've honed my skills in AWS cloud services, containerization, and CI/CD pipelines. As an AWS Certified Developer, I'm well-versed in leveraging cloud technologies to drive efficiency and innovation. πŸ’‘ I firmly believe in the power of continuous improvement. My journey began with an internship, where I immersed myself in the intricacies of DevOps, from deploying web applications to orchestrating containerized solutions. I've also delved into AWS CDK, enhancing security through RDS instance policies, and creating foundational infrastructure with precision. 🌐 My goal is to share insights, best practices, and the latest trends in the DevOps landscape. I'm excited to connect with like-minded professionals, engage in meaningful discussions, and learn from the diverse experiences of the Hashnode community. πŸ“ Let's explore the ever-evolving world of DevOps together. Feel free to connect with me, ask questions, or share your own insights. Together, we can drive innovation and efficiency in the tech world!

objectives

  • Helm

  • Installation

  • Architecture

  • Charts

  • Functions

  • Pipelines

  • Conditionals

  • with Blocks

  • Range

  • Chart Hooks

  • Packaging & Signing

  • Uploading

What is Helm?

  • Helm is a package manager in the Kubernetes.

  • helm install WordPress

  • helm upgrade WordPress

  • helm rollback WordPress

  • helm uninstall WordPress

Installing Helm

Requirements:

  • sudo snap install helm

  • sudo snap install helm --classic

--classic gives more priveledges to the host system

Helm 2 vs. Helm 3

Helm 2

we require Tiller to be installed in the cluster to perform the Kubernetes tasks.

Tiller is a middleware between the k8s cluster and helm.

Tiller by default run in guard mode.

Every change is stored as a snapshot in the form of revisions.

Helm 3:

Not using the Tiller as middleware

3-way strategic Merge Patch

Helm Components:

Release is a single installation of an application.

Each Release has multiple Revisions in it.

Metadata can be stored in secret in the k8s cluster

Charts are collections of objects.

Templating in Helm

syntax

{{ .Values. name}}

helm install [release][chart-name]

helm install my-site bitnami/WordPress

releases are more useful for launching the same application as multiple apps.

Helm Repositories

ArtifactHib.io

All the artefact repositories are stored in the Hub.

Helm charts

Charts are the instruction manuals.

Helm structure

Helm CLI

helm --help

helm repo --help

helm repo update --help

helm search wordpress

helm search hub wordpress

Deploying WordPress

helm repo add bitnami https://charts.bitnami.com/bitnami

helm install my-release bitnami/WordPress

Helm Releases

helm list

helm uninstall my-release

helm repo

helm repo list

helm repo update

Customizing Chart parameters

custom Parameters in Command Line --set

helm install --set wordpreddBlogName="Helm Tutorials" my-release bitnami/WordPress

This will replace the values in the Values.yml

we can also pass those values as custom values by creating another file for it as custom-values. yaml

helm install --values custom-values.yaml my-release bitbami/WordPress

helm pull bitnami/WordPress

helm pull --untar bitnami/wordpress

ls WordPress

helm install my-release ./wordpress

Life Cycle Management

Each release is independent of the other. we can revert the things based on your requirement

helm install nginx-release bitnami/nginx --version 7.10

helm upgrade nginx-release bitnami/nginx

helm list

helm history nginx-release

helm rollback nginx-release 1

whenever we roll back the release it will create a new revision.

Helms Charts Atanomy

helm create <helm-chart-name>

It will create a sample helm chart.

Templatize

Templatize is useful to pass the values as dynamic in the template files

Verifying the Helm charts

Lint: It is used to verify the yaml files are correct

Template:

Dry Run: This will be useful to verify the chart will run in the k8s cluster

helm template ./nginx-chart

helm template release-Naem ./nginx-chart

helm template release-Naem ./nginx-chart --debug

helm install hello-world-1 ./nginx-chart --dry-run

Functions

upper

{{ upper .Values.image.repository }}

quote

{{ quote .Values.image.repository }}

replace

{{ replace "x" "y" .Values.image.repository }}

shuffle

{{ shuffle .Values.image.repository }}

refer the documentation pages

{{ default "nginx" .Values.image.repository }}

Pipelines

{{ .Values.image.repository | upper | quote | shuffle }}

Conditionals

{{- if .Values.orgLabels }}

labels:

org: {{ .Values.orgLabel }}

{{- end }}

- removes the extra spaces in the file

{{- if .Values.orgLabels }}

labels:

org: {{ .Values.orgLabel }}

{{- else if eq .Values.orgLabel "hr" }}

labels:

org: human resources

{{- end }}

FunctionPurpose
eqequal
nenot equal
ltless than
leless than or equal
gtgreater than
gegreater than or equal
notnegation
emptyvalue is empty

With Blocks

. -> Root scope

if we are not specifing the scope then we need traverse from root only

we can define scope using the with block

Range

Named Templates


Thanks for reading! I hope you found this helpful and informative.

I'm always happy to connect with fellow tech enthusiasts and answer any questions you may have. Don't forget to follow me for more updates on tech, programming, and more.πŸ˜„πŸ˜„

Follow me on LinkedIn to see interesting posts like this : ) Linkedin