Creating a Helm Chart

Where we are in our stages

A couple of rules first

  • chart names should be lower case letters, numbers and dashes. No underscores, dots, or uppercase letters. Stay away from special characters too, like /\!@#$%^ and others.
  • Chart names must match the name of the parent directory. If you have a chart named myapp, it should be in a directory called myapp. This will get made automatically as you will see below.
  • Helm uses SemVer2 verisoning.
  • have Helm installed on your machine

Hello-World, again.

We are using Helm v.3.1.2.

Initialize your directory

newly created directory structure

Delete the contents of the following files, but don’t delete the files themselves.

hello-world/templates/deployment.yaml
hello-world/templates/ingress.yaml
hello-world/templates/NOTES.txt
hello-world/templates/service.yaml
hello-world/templates/serviceaccount.yaml
hello-world/templates/test/test-connection.yaml
empty files

Chart.yaml

Chart.yaml

values.yaml

current configmap.yaml
added key:value pairs in values.yaml
values.yaml with a camelCase key

Create a configmap template if you are using one

our configmap.yaml again
using the new value camelCase value

Let’s test our changes in the command line.

  1. We attempted to install the chart, but used the --dry-run parameter so it’s not actually going to install anything.
  2. All we have is a configmap so it would’ve installed a configmap without --dry-run
  3. hello-world is the name of your chart
  4. .hello-world\ is the path to your chart
  5. -f hello-world\values.yaml is telling helm you want to use this values file.
  • values.yaml is where all your data lives
  • the curly braces basically says replace this with the values defined. Here it’s fromValues(from the values.yaml file).airwaveHWPort(the key inside of the values.yaml file).

More Templates

deployment.yaml

before
templatized

service.yaml

before
templatized

Test

confimap, service, and deployment files have interpolated the values.

Deploy it

lots of output
  • deployment
  • service
  • configmap
proof the 3 resources were created

Package it

Recap

  • how to create a Helm chart
  • how Helm values work
  • how to turn your existing Kubernetes manifests into Helm templates
  • how to deploy your chart
  • how to package your chart

To delete

Next Steps

--

--

--

Helping you build the hardest parts of your Stack

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Five handy Excel macros to take boring chores out of your workday

LINUX : Commands

Introducing “A Developer Story”

Generate a PDF File From an HTML Template

Serve website/API from you local system

Hello World

From Private School Teacher to Software Engineer: My Journey During the Pandemic

How I became a software engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
AirwaveTech

AirwaveTech

Helping you build the hardest parts of your Stack

More from Medium

Prometheus Grafana: configuration & query examples

Monitoring Applications in OpenShift using Red Hat Advanced Cluster Manager

K8s || On-Prem

3.14 Tips for using the Kubernetes Cluster Autoscaler on Oracle Cloud