helm
"The Kubernetes Package Manager" - https://github.com/kubernetes/helm
These notes are all about helm version 3. Charts that require helm 3 should use apiVersion: v2
, though helm 3 does support v1.
Links
Tips
List all versions of a chart in a given repo
helm search repo -l repo_name/chart_name --devel
Get values of a deployed chart
This only shows values that were passed in, not default values.
$release_name
is the NAME column in helm list
helm get values -o yaml "$release_name" > values.yaml
To get a list of all values, use
helm get values --all -o yaml "$release_name" > values.yaml`
Show notes for a deployed service
Notes are printed when you install a service, but they can be viewed again by running helm status <release_name>
where <release_name>
is one of the releases from helm list
.
Install the stable repo
helm repo add stable https://charts.helm.sh/stable
Install the incubator repo
https://github.com/helm/charts#how-do-i-enable-the-incubator-repository
helm repo add incubator https://charts.helm.sh/incubator
Show metadata about a specific release in json
You can find the revision in a few places, like helm list -A
. Default is to store data about the last 10 releases per release_name.
helm history -n "$NS" "$RELEASE_NAME" -o json | jq '.[] | select(.revision == 157)'
Show raw data about what helm sent to the k8s server for a recent release
First, find the secret that you will want to search. You can get the release number from helm history -n "$NS" foo
or dig in kubectl -n $NS get secret
$ k -n "$NS" get secret | grep sh.helm.release | tail -n 3 | column -t
sh.helm.release.v1.foo.v338 helm.sh/release.v1 1 14d
sh.helm.release.v1.foo.v339 helm.sh/release.v1 1 13d
sh.helm.release.v1.foo.v340 helm.sh/release.v1 1 4d23h
Then send that secret into the following command to get the full manifest that was sent to the k8s api:
k -n "$NS" get secret "$SECRET" -o go-template='{{ .data.release | base64decode | base64decode }}' |
gzip -d
The result is a json blob with all the details of how the helm chart was applied, including hook manifests, app manifests, and other metadata.
Links
- https://github.com/databus23/helm-diff: "This is a Helm plugin giving your a preview of what a helm upgrade would change."
- https://blog.flant.com/advanced-helm-templating