Helm packages are named helm charts.
A chart contains:
- a "Chart.yaml" file.
- a "templates" directory (contains Kubernetes' manifests).
- an optional default configuration file "values.yaml".
Installing a chart involves the following steps:
- Helm reads the chart.
- Helm replaces the custom values in their corresponding place holders in the chart templates.
- Helm sends the updated templates (manifests) to Kubernetes (which creates the requested resources).
When you run the "
helm install" command on a chart, you start an new installation of that chart (a first release is created).
When you run the "
helm uprade" command on a chart, you start an upgrade of an existing installation of that chart (a new release is created).
A new release is also created when you rollback an installation.
A helm chart has two versions:
- the chart version: the version of the chart.
- the app version: the version of the application packaged in the chart.
The chart version and the app version are defined in the file "
Chart.yaml":
Helm uses the chart version to make versioning decisions, such as which package is newest.
Multiple charts with different versions may have the same app version.
To install a chart you need to specify its path and a name of the installation.
The name of the installation identifies a specific instance of the chart and hence it must be unique within a Kubernetes' namespace.
Installing a chart using an existing installation's name will result with an error.
To install a chart, use this command:
You can spefify a Kubernetes' namespace where the chart will be installed:
The output of running the helm install/upgrade commands is printed in the screen:
You can provide more information about the installation by adding a file with the name "
NOTES.txt" under the "
templates" folder of the helm chart:
https://helm.sh/docs/chart_template_guide/notes_files/
You can also use the
helm get notes my-chart-install-name command to print the output of the execution of these commands.
You can list your charts installations using the "
helm list" command:
This will list the installations in the current namespace along with some information for each installation
(name, namespace, revision number, last update date, status, version of the chart, version of the app).
To use another namespace, use the "
--namespace" flag (or "
-n"):
To list all installations in all namespaces to which you have access, you can use the "
--all-namespaces" flag:
To uninstall a chart installation, you can use the "
helm uninstall" command:
You can use the "
--namespace" flag to uninstall a chart in a specific namespace: