Helm – Creating a Chart (Kubernetes)

Previously I discussed using Helm to install existing charts into Kubernetes (https://geektechstuff.com/2026/03/06/helm-kubernetes-package-manager-kubernetes/), but what if you have a custom self-made app or want to create a bespoke install into Kubernetes?

Helm Create

Alongside existing Helm charts, Helm gives you the option of creating your own charts. In fact, Helm even gives you a template with an example of Nginx. To see it run the Helm command:

helm create YOUR-CHART-NAME
e.g.
helm create geektechstuffExampleChart

Manual Creation

By default the helm create command includes templates for services, deployments etc that you may not need. A minimal Helm chart can also be created manually, it just needs a few files:

Chart.yaml
values.yaml
templates
- NOTES.txt
- deployment.yaml

These should all be placed inside a directorate (or code repository).

The chart.yaml tells Helm the name and version details.

values.yaml contains the values that are plugged into anything under the templates directorate.

The templates directorate contains templates for anything that needs to be deployed into Kubernetes.

Templates can call on values from values.yaml so that DRY principles can be followed and it allows for multiple deployments to use the same chart but with different values files to get different output resources in Kubernetes. For example, the appName value is being pulled from values.yaml below:

apiVersion: apps/v1
kind: Deployment
metadata:
name: depflask
spec:
replicas: 5
selector:
matchLabels:
name: {{ .Values.appName }}
template:
metadata:
labels:
name: {{ .Values.appName }}

If all the above was placed inside a directorate called “helm-basic-chart” I would then run the following Helm command to deploy the chart and install it as “geektest” in my Kubernetes cluster:

helm install geektest helm-basic-chart

Note: Make sure to run the command from the directory containing helm-basic-chart (e.g. not from within helm-basic-chart directorate).

I’ve uploaded a basic Helm chart to GitHub at: https://github.com/geektechdude/helm-basic-chart/ to show a Helm chart that deploys a Flask (Python) web app as a deployment (5 pods) with a Load Balancer to balance traffic between the pods.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Welcome to GeekTechStuff

My home away from home and where I will be sharing my adventures in the world of technology and all things geek.

The technology subjects have varied over the years from Python code to handle ciphers and Pig Latin, to IoT sensors in Azure and Python handling Bluetooth, to Ansible and Terraform and material around DevOps.

Let’s connect