helm.md (1918B)
1 +++ 2 title = 'Helm: Kubernetes package manager' 3 +++ 4 ## Helm: Kubernetes package manager 5 Introduces Helm chart, which describes contents of all objects in the application using a single package. 6 A running instance of such a set of Kubernetes objects is a "release". 7 Helm charts are stored in repos. 8 Helm must be installed separately from Kubernetes. 9 10 From end user POV, on microk8s you do `microk8s enable helm3`, and then use it like a standard package manager (i.e. `list`, `install`, `uninstall`...) 11 12 ### Creating charts 13 A chart can include other charts. 14 A chart contains `Chart.yaml`, a `values.yaml`, and a templates folder. 15 16 Start by running `helm create <chart-name>`, which gives you a starting skeleton: 17 - `Chart.yaml`: mandatory. `type` field can be `application` (deployed standalone), or `library` (deployed as dependencies of other apps). 18 - dependencies may include `tags` (list of labels) and `conditions` (one or more YAML paths, and the chart can be enabled/disabled based on their values in the top-level `values.yaml`) 19 - `templates/`: YAML template files defined with the syntax of Go templates. You can see what's generated with e.g. `helm install --dry-run --debug <chart-path> --generate-name` 20 - `service.yaml`: uses Helm-specific objects `.Chart` (metadata like name and version) and `.Values` (exposes config that can be set at `helm install` time using `--set yaml.path=value`) 21 - `.Values` can come from the chart's `values.yaml` or that of a parent chart, or a values flag passed via `helm install -f newvalues.yaml`, or individual values passed via `helm install --set path=value` 22 23 Then, you can install it with `helm install <release-name> <chart-dir>`, and see that it's installed with `helm ls`. 24 25 To package it, do `helm package <chart-dir>`. 26 You can upgrade a release with `helm upgrade <release-name> <chart-package-tgz>`, and downgrade with `helm rollback <release-name> <revision>`.