Credits: Logo by helm.sh
Learn how to configure the deployment of multiple Kubernetes resources as a single unit using Helm package manager.
Note: This post is a TL;DR for sharing basic Helm v3 usage which is required for the reader just to get started, for additional information please follow the official docs.
Helm-CLI
Mostly TL;DRs for installing the Helm CLI.
Install
Install using your favorite package manager, consult with the official docs for additional information.
# tl;dr for macOS
brew install helm
Uninstall
Follow the removal instructions of the package manager you've used previously.
# tl;dr for macOS
brew uninstall helm
Charts
Helm Charts are the actual "packages" managed by Helm. A chart is a just another YAML file which consists of custom attributes that eventually gets converted into Kubernetes YAML resources and deployed into the cluster.
Why? Instead of managing multiple resources on our own and their respective Kubernetes YAML resource files, we can wrap them all into a single Helm chart and address them as a unit, meaning, install/update/uninstall using a single command. Charts can go from a simple hello-world application to a fully blown web application i.e servers, databases, cache etc..
Note: On the following sections, I'll use
traefik
proxy as an example Helm chart.
Search
In order to be able to search for charts we'll have to find its respective Helm repository that returns its metadata. Search in artifacthub.io for the Helm repository for the chart that you wish to use.
-
We'll add the
containous
Helm repository hosting thetraefik
charts metadata
helm repo add traefik https://containous.github.io/traefik-helm-chart
-
Update local Helm chart repository cache
helm repo update
-
Search for a specific chart by name
helm search repo traefik # NAME CHART VERSION APP VERSION # traefik/traefik 9.1.1 2.2.8
Install
Install a Helm chart directly from the command line. For additional installation options read here.
helm install traefik \
--namespace traefik \
traefik/traefik \
--version 9.1.1
Note: It is possible to use the same Helm command for both install & upgrade by supplying the flag
--install
. If a release doesn't already exist by the supplied name, an install command would trigger.
Replacehelm install
withhelm upgrade --install
.
Upgrade
Upgrade or override existing values of the previously deployed chart with a new chart release. For additional upgrade options read here.
helm upgrade traefik \
--namespace traefik \
--set="additionalArguments={--log.level=DEBUG}" \
traefik/traefik \
--version 9.1.1
Note: When updating partial attributes on a pre-installed Helm chart, the Kubernetes resource pods which relates to these specific attributes would get created anew to apply the new changes.
Summary
This post is just the tip of the iceberg regarding Helm charts possibilities, please refer to the official Helm docs for further reading.
Please leave your comment, suggestion or any other input you think is relevant to this post in the discussion below.
Like this post?
You can find more by:
Checking out my blog: https://blog.zachinachshon.com
Following me on twitter: @zachinachshon
Thanks for reading! ❤️
Top comments (0)