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 --debugExample:
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 defaultTo get all values including defaults and overrides (merged output):
helm get values <release-name> -n <namespace> --allExample:
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 ./mychartThis 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.yamlThen 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:
-for--valuesto supply a YAML file with configuration overrides.--setto pass values inline via the command line.
๐ Using -f or --values (YAML file)
helm install my-nginx bitnami/nginx -f custom-values.yamlhelm upgrade my-nginx bitnami/nginx -f dev-values.yaml -n devYou can also supply multiple files in order of precedence:
helm install my-nginx bitnami/nginx -f base.yaml -f prod.yamlThe 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=LoadBalancerSet 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.