Additional

๐Ÿ” Preview Manifests Before Installing

To preview the rendered Kubernetes manifests from a Helm chart without installing it, use:

helm template <release-name> <chart-path-or-name>

Example:

helm template my-nginx bitnami/nginx

๐Ÿงช Simulate Installation (Dry Run)

To simulate an install with all validations (including custom values):

helm install <release-name> <chart-path-or-name> --dry-run --debug

Example:

helm install my-nginx bitnami/nginx --dry-run --debug

๐Ÿ“ฅ Get Values from Existing Release

To retrieve the custom values used in an existing Helm release:

helm get values <release-name> -n <namespace>

Example:

helm get values my-nginx -n default

To get all values including defaults and overrides (merged output):

helm get values <release-name> -n <namespace> --all

Example:

helm get values my-nginx -n default --all

๐Ÿ“„ Get Default values.yaml from a Helm Chart

To get the default values.yaml file from a Helm chart before installing it, use:

helm show values <chart-name>

๐Ÿ“ฆ Example (from a remote repository):

helm show values bitnami/nginx

๐Ÿ“ Example (from a local chart directory):

helm show values ./mychart

This command prints all the default configuration options supported by the chart.


๐Ÿ’พ Save Default Values for Customization

You can redirect the output to a file, edit it, and use it during installation:

helm show values bitnami/nginx > custom-values.yaml

Then install with:

helm install my-nginx bitnami/nginx --values custom-values.yaml

โœ… This is a best practice for controlled and repeatable deployments.

๐Ÿ”ง Using -f, --values, and --set in Helm

Helm allows customization of charts using:

  • -f or --values to supply a YAML file with configuration overrides.
  • --set to pass values inline via the command line.

๐Ÿ“ Using -f or --values (YAML file)

helm install my-nginx bitnami/nginx -f custom-values.yaml
helm upgrade my-nginx bitnami/nginx -f dev-values.yaml -n dev

You can also supply multiple files in order of precedence:

helm install my-nginx bitnami/nginx -f base.yaml -f prod.yaml

The last file overrides values from the previous ones.


๐Ÿ’ก Using --set (Inline values)

Set a single value inline:

helm install my-nginx bitnami/nginx --set service.type=LoadBalancer

Set multiple values inline:

helm install my-nginx bitnami/nginx \
  --set replicaCount=2 \
  --set image.tag=1.23.0 \
  --set service.type=NodePort

๐Ÿ”„ Combine --set and --values

You can combine both options. Inline --set overrides the values in the file:

helm install my-nginx bitnami/nginx \
  -f custom-values.yaml \
  --set service.type=LoadBalancer

๐Ÿ“ Set Nested/Array Values with --set

For nested keys:

helm install my-nginx bitnami/nginx \
  --set metrics.enabled=true \
  --set ingress.enabled=true \
  --set ingress.hostname=nginx.example.com

โœ… Use --values for maintainable configurations,
โœ… Use --set for quick overrides or scripting.