Cheat Sheet

Helm cheatsheet featuring all the necessary commands required to manage an application through Helm.


Basic interpretations/context

Chart:

  • It is the name of your chart in case it has been pulled and untarred.
  • It is <repo_name>/<chart_name> in case the repository has been added but chart not pulled.
  • It is the URL/Absolute path to the chart.

Name:

  • It is the name you want to give to your current helm chart installation.

Release:

  • Is the name you assigned to an installation instance.

Revision:

  • Is the value from the Helm history command

Repo-name:

  • The name of a repository.

DIR:

  • Directory name/path

Chart Management

  1. helm create <name> # Creates a chart directory along with the common files and directories used in a chart.
  2. helm package <chart-path> # Packages a chart into a versioned chart archive file.
  3. helm lint <chart> # Run tests to examine a chart and identify possible issues:
  4. helm show all <chart> # Inspect a chart and list its contents:
  5. helm show values <chart> # Displays the contents of the values.yaml file
  6. helm pull <chart> # Download/pull chart
  7. helm pull <chart> --untar=true # If set to true, will untar the chart after downloading it
  8. helm pull <chart> --verify # Verify the package before using it
  9. helm pull <chart> --version <number> # Default-latest is used, specify a version constraint for the chart version to use
  10. helm dependency list <chart> # Display a list of a chart’s dependencies:

Install and Uninstall Apps

  1. helm install <name> <chart> # Install the chart with a name
  2. helm install <name> <chart> --namespace <namespace> # Install the chart in a specific namespace
  3. helm install <name> <chart> --set key1=val1,key2=val2 # Set values on the command line (can specify multiple or separate values with commas)
  4. helm install <name> <chart> --values <yaml-file/url> # Install the chart with your specified values
  5. helm install <name> <chart> --dry-run --debug # Run a test installation to validate chart (p)
  6. helm install <name> <chart> --verify # Verify the package before using it
  7. helm install <name> <chart> --dependency-update # update dependencies if they are missing before installing the chart
  8. helm uninstall <name> # Uninstall a release

Perform App Upgrade and Rollback

  1. helm upgrade <release> <chart> # Upgrade a release
  2. helm upgrade <release> <chart> --atomic # If set, upgrade process rolls back changes made in case of failed upgrade.
  3. helm upgrade <release> <chart> --dependency-update # update dependencies if they are missing before installing the chart
  4. helm upgrade <release> <chart> --version <version_number> # specify a version constraint for the chart version to use
  5. helm upgrade <release> <chart> --values # specify values in a YAML file or a URL (can specify multiple)
  6. helm upgrade <release> <chart> --set key1=val1,key2=val2 # Set values on the command line (can specify multiple or separate valuese)
  7. helm upgrade <release> <chart> --force # Force resource updates through a replacement strategy
  8. helm rollback <release> <revision> # Roll back a release to a specific revision
  9. helm rollback <release> <revision> --cleanup-on-fail # Allow deletion of new resources created in this rollback when rollback fails

List, Add, Remove, and Update Repositories

  1. helm repo add <repo-name> <url> # Add a repository from the internet:
  2. helm repo list # List added chart repositories
  3. helm repo update # Update information of available charts locally from chart repositories
  4. helm repo remove <repo_name> # Remove one or more chart repositories
  5. helm repo index <DIR> # Read the current directory and generate an index file based on the charts found.
  6. helm repo index <DIR> --merge # Merge the generated index with an existing index file
  7. helm search repo <keyword> # Search repositories for a keyword in charts
  8. helm search hub <keyword> # Search for charts in the Artifact Hub or your own hub instance

Helm Release monitoring

  1. helm list # Lists all of the releases for a specified namespace, uses current namespace context if namespace not specified
  2. helm list --all # Show all releases without any filter applied, can use -a
  3. helm list --all-namespaces # List releases across all namespaces, we can use -A
  4. helm -l key1=value1,key2=value2 # Selector (label query) to filter on, supports '=', '==', and '!='
  5. helm list --date # Sort by release date
  6. helm list --deployed # Show deployed releases. If no other is specified, this will be automatically enabled
  7. helm list --pending # Show pending releases
  8. helm list --failed # Show failed releases
  9. helm list --uninstalled # Show uninstalled releases (if 'helm uninstall --keep-history' was used)
  10. helm list --superseded # Show superseded releases
  11. helm list -o yaml # Prints the output in the specified format. Allowed values: table, json, yaml (default table)
  12. helm status <release> # This command shows the status of a named release.
  13. helm status <release> --revision <number> # if set, display the status of the named release with revision
  14. helm history <release> # Historical revisions for a given release.
  15. helm env # Env prints out all the environment information in use by Helm.

Download Release Information

  1. helm get all <release> # A human readable collection of information about the notes, hooks, supplied values, and generated manifest file of the given release.
  2. helm get hooks <release> # This command downloads hooks for a given release. Hooks are formatted in YAML and separated by the YAML '---\n' separator.
  3. helm get manifest <release> # A manifest is a YAML-encoded representation of the Kubernetes resources that were generated from this release's chart(s). If a chart is dependent on other charts, those resources will also be included in the manifest.
  4. helm get notes <release> # Shows notes provided by the chart of a named release.
  5. helm get values <release> # Downloads a values file for a given release. use -o to format output

Plugin Management

  1. helm plugin install <path/url1> # Install plugins
  2. helm plugin list # View a list of all installed plugins
  3. helm plugin update <plugin> # Update plugins
  4. helm plugin uninstall <plugin> # Uninstall a plugin