Installing Helm, Kubernetes Package Manager
Tags: helm, charts, kubernetes, packagemanager
Published: 2021-05-02 07:22:28

<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gs3grpue1pw51as7jkfu.png" />

<sup><b>Credits:</b> Logo by [helm.sh](https://helm.sh/)</sup>

Learn how to configure the deployment of multiple Kubernetes resources as a single unit using Helm package manager.

- [Helm CLI](#helm-cli)
   - [Install](#install) 
   - [Uninstall](#uninstall)
- [Charts](#charts)
   - [Search](#chart-search)
   - [Install](#chart-install)
   - [Upgrade](#chart-upgrade)
- [Summary](#summary)

<p>&nbsp;</p>

> **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](https://helm.sh/docs/).

<p>&nbsp;</p>

<h1 id="helm-cli">Helm-CLI</h1>

Mostly _TL;DRs_ for installing the Helm CLI.

<h3 id="install">Install</h3>

Install using your favorite package manager, consult with the [official docs](https://helm.sh/docs/intro/install/) for additional information.

```bash
# tl;dr for macOS
brew install helm
```

<h3 id="uninstall">Uninstall</h3>

Follow the removal instructions of the package manager you've used previously.

```bash
# tl;dr for macOS
brew uninstall helm
```

---

<h1 id="charts">Charts</h1>

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.

<h3 id="charts-search">Search</h3>

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](https://artifacthub.io/) for the Helm repository for the chart that you wish to use.

1. We'll add the `containous` Helm repository hosting the `traefik` charts metadata

    ```bash
    helm repo add traefik https://containous.github.io/traefik-helm-chart
    ```
    <p>&nbsp;</p>

1. Update local Helm chart repository cache 

    ```bash
    helm repo update
    ```
    <p>&nbsp;</p>

1. Search for a specific chart by name 

    ```bash
    helm search repo traefik
    
    # NAME              CHART VERSION   APP VERSION
    # traefik/traefik   9.1.1           2.2.8   
    ```

<p>&nbsp;</p>

<h2 id="charts-install">Install</h2>

Install a Helm chart directly from the command line. For additional installation options read [here](https://helm.sh/docs/helm/helm_install/).

```bash
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.<br>Replace `helm install` with `helm upgrade --install`.

<p>&nbsp;</p>

<h3 id="charts-upgrade">Upgrade</h3>

Upgrade or override existing values of the previously deployed chart with a new chart release. For additional upgrade options read [here](https://helm.sh/docs/helm/helm_upgrade/).

```bash
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.

---

<h1 id="summary">Summary</h1>

This post is just the tip of the iceberg regarding Helm charts possibilities, please refer to the official [Helm docs](https://helm.sh/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! ❤️