Getting started with Helm

(Install, Upgrade, Rollback, Uninstall)

Helm Repositories

  • Add helm repo on your local machine:

    helm repo add [NAME] [URL]
    helm repo add crossplane-stable https://charts.crossplane.io/stable
  • List already added repositories:

      helm repo list
      NAME             	URL                                      
      tremolo          	https://nexus.tremolo.io/repository/helm/
      bitnami          	https://charts.bitnami.com/bitnami       
      kasten           	https://charts.kasten.io/                
      hashicorp        	https://helm.releases.hashicorp.com      
      crossplane-stable	https://charts.crossplane.io/stable 
  • Update existing added repositories:

     helm repo update
      Hang tight while we grab the latest from your chart repositories...
      ...Successfully got an update from the "hashicorp" chart repository
      ...Successfully got an update from the "crossplane-stable" chart repository
      ...Successfully got an update from the "kasten" chart repository
      ...Successfully got an update from the "bitnami" chart repository
      ...Successfully got an update from the "tremolo" chart repository
      Update Complete. ⎈Happy Helming!⎈
  • Remove existing repositories:

    helm repo remove tremolo
    "tremolo" has been removed from your repositories

Helm Plugins

A Helm plugin is a tool that can be accessed through the helm CLI, but which is not part of the built-in Helm codebase.

Examples:

  • Helm Diff: Performs a diff between a deployed release and proposed Helm upgrade

  • Helm Secrets: Used to help conceal secrets from Helm charts

  • Helm Monitor: Used to monitor a release and perform a rollback if certain events occur

  • Helm Unittest: Used to perform unit testing on a Helm chart


Helm ENV Vars


Operating System
Cache Path
Configuration Path
Data Path

Windows

%TEMP%\helm

%APPDATA%\helm

%APPDATA%\helm

macOS

$HOME/Library/Caches/helm

$HOME/Library/Preferences/helm

$HOME/Library/helm

Linux

$HOME/.cache/helm

$HOME/.config/helm

$HOME/.local/share/helm

  • Helm uses the cache path to store charts that are downloaded from upstream chart repositories. Installed charts are cached to the local machine to enable faster installation of the chart the next time it is referenced. The cache path also includes YAML files that are used to index the available Helm charts from each configured repository. These index files are updated when users run the helm repo update command.

  • The configuration path is used to save repository information, such as the URL and credentials for authentication, if required. When a chart is installed but is not located in the local cache yet, Helm uses the configuration path to look up the URL of the chart repository. The chart is then downloaded from this URL.

  • The data path is used to store plugins. When a plugin is installed using the helm plugin install command, the plugin itself is stored in this location.


  • For bash

  • For zsh


  • Find, install and publish Kubernetes packages

  • Will search wordpress chart in ArtifactHub

  • Will add the Bitnami repo in your local index.

    • archive-full-index will list all the old charts as well.

  • Will list all the available charts under binami repo.

    • Always run helm repo update, this will update you locally added repos.

  • Search all previous versions

Chart details


  • To see chart's default values

  • Overriding values, using values.yaml

  • Installing helm chart

  • Get notes of a release

  • First, get list of releases

  • Get notes by release name

  • Get manifest of named release

  • You can get following details around any release, using helm get command.


  • Get values that has been applied on the installed release:

    • Get all values supported by this release :

  • Many Helm charts add the app.kubernetes.io/name label (or a similar label) on the resources they create.


Upgrading WordPress Release

  • Let's update values.yaml and add following values:

  • Helm upgrade command includes two additional values-related flags.

    • --reuse-values (default): When upgrading, reuse the last release’s values

    • --reset-values: When upgrading, reset the values to the chart defaults

    • If at least one value is provided with --set or --values, then the --reset-values flag is applied by default.


Rolling back

  • Every Helm release has a history of revisions.

  • Revision data is saved in Kubernetes Secrets by default.

  • Each of these Secrets corresponds with an entry of the release’s revision history

  • We can check the values, that has been applied on a specific REVISION.

helm rollback <RELEASE> [REVISION] [flags]


Uninstalling helm Release

  • Helm will not delete any additional resources created by the resources from the helm chart.

  • For example, a PVC got created for the statefulset. Which is not part of chart.

  • So, will have to manually delete that.

Last updated