Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

A "package manager" for Kubernetes.

Take a look at already built Charts.

Old Sample Charts

Install

Linux

$: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
$: chmod 700 get_helm.sh
$: ./get_helm.sh  # upgrade or install

Windows

$: scoop install helm  # check if its 3.x or 2.x
$: scoop uninstall helm

Instructions

Common Operations

# Note: [-n K8s-Namespace] specifies a namespace

$: helm repo list
$: helm repo add Repo-Name Repo-Name Repo-Url
$: helm repo update
$: helm repo remove Repo-Name

$: helm _command [--wait [--timeout _time]] [--no-hooks]
  # --timeout _time: max wait time to completion
  # --wait: wait until Pods are in Ready state
  # --no-hooks: skip running hooks

$: helm search repo Repo-Name  # search for chart
$: helm show values Repo-Name/Chart-Name  # list config fields and values
$: helm install Release-Name Repo-Name/Chart-Name [-f Config-File.yaml] [--version Chart-Version] [--debug --dry-run]  # install chart

$: helm status Release-Name  # list release status
$: helm get values Release-Name  # list set config values

$: helm upgrade -f config.yaml Release-Name Repo-Name/Chart-Name  # upgrade chart
$: helm history Release-Name  # show Revision-Ids
$: helm rollback Release-Name Revision-Id  # revert upgrade

$: helm list [--all]  # list Release-Names
$: helm uninstall Release-Name [--keep-history]  # uninstall chart

Common commands

Creating Charts

$: helm create Chart-Name [--starter]
$: helm dependency update Chart-Name  # download dependency Charts to charts/
$: helm lint Chart-Name
$: helm template Chart-Name  # output filled in templates to stdout
$: helm package Chart-Name  # create Chart-Name-Chart-Version.tgz
$: helm install Release-Name Chart-Package-Tgz-Name [--debug --dry-run]

If a template uses Go templating, replace {{ with {{ "{{" }}.

Details

Tips and tricks

Tips and tricks:

  • Helm uses Go templates and Sprig library
  • Quote Strings, but not Integers except ENV VARs
  • include
  • required
  • tpl evaluates strings as templates inside a template. It will pass a template string as a value to a Chart!
  • Create an image pull Secret; see Research
  • Roll Pods using unique identifiers
  • Prevent Helm from deleting selected resources
  • Helper templates and partials are placed in a _helpers.tpl file
  • YAML is a Superset of JSON, so pick which one works best for you
  • Random data changes will update a resource
  • Install or upgrade helm upgrade --install Release-Name --values values.yaml Chart-Dir

Errors

Error: could not get apiVersions from Kubernetes: unable to retrieve the complete list of server APIs
$: kubectl get apiservice

# Note: remove all failed API services