K8s HELM Charts

Manish Dixit
3 min readJan 25, 2024

--

HELM is a powerful package manager for Kubernetes, designed to simplify the deployment and management of applications. In the complex ecosystem of Kubernetes, HELM provides a streamlined approach to defining, installing, and upgrading applications, referred to as charts.

Charts: What Are They?

In HELM, charts are collections of preconfigured Kubernetes resources that are packaged together for simple deployment. These resources include services, deployments, and ingress rules. The deployment logic, dependencies, and configuration of the application are all contained in a single, reusable package.

When to Use Charts and HELM

  1. Application Deployment:

When delivering complicated applications with several microservices or components, HELM and charts come in handy. You may ensure consistency and repeatability by deploying the entire application with a single command by assembling these components into charts.

2. Versioning and Upgrades:

By controlling releases and keeping track of modifications, HELM makes versioning and upgrading of applications easier. This makes it easier to manage the lifespan of apps running on Kubernetes by enabling seamless upgrades and rollbacks.

3. Configuration management:

Because charts allow parameterization, deployments can be customised according to environment-specific configurations. This adaptability is useful for overseeing many deployment settings, including production, testing, and development.

4. Community Collaboration:

The community maintains and shares HELM charts frequently, offering a library of reusable parts for shared services and apps. Charts maintained by the community can be used to expedite development and guarantee adherence to best practices.

Lets Try

1. Install HELM:

First, install HELM on your local machine or cluster by following the official documentation.

$ curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
$ chmod 700 get_helm.sh
$ ./get_helm.sh

Or

curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash if you want to live on the edge.

2. Create Chart:

Create a new directory for your chart, and use the helm create command to generate the basic chart structure.

$ mkdir mywebapp
$ cd mywebapp
$ helm create mywebapp

3. Customize Chart:

Modify the generated chart files (values.yaml, deployment.yaml, service.yaml etc.) to define your application's configuration and resources.

4. Package Chart:

Once your chart is ready, package it into a .tgz file using the helm package command.

$ helm package mywebapp

Successfully packaged chart and saved it to

<your-path>/mywebapp/mywebapp-0.1.0.tgz

5. Install Chart:

Install the packaged chart onto your Kubernetes cluster using the helm install command.

$ helm install mywebapp ./mywebapp-0.1.0.tgz

You will see something like below as output

NAME: mywebapp
LAST DEPLOYED: Mon Jan 24 15:04:10 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

6. Verify Deployment:

Check the status of your deployment to ensure it’s running successfully.

$ kubectl get pods

add namespace using -n if you have configured multiple namespaces.

7. Access Application:

Access your deployed application using the provided service URL or by exposing it via an Ingress resource.

$ kubectl get svc

You will see some output like below

NAME              TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
mywebapp ClusterIP 10.100.11.123 <none> 80/TCP 1m

The creation of a chart, packaging, installation onto a Kubernetes cluster, deployment verification, and access to the deployed application have all been exhibited using HELM above. This demonstrates how to use charts and HELM for application deployment from start to finish.

This is very abstract and short version of HELM and charts and there is lot to learn. But I guess this is sufficiently enough to start.

Happy Deployment !!!

--

--

Manish Dixit
Manish Dixit

No responses yet