Helm: Get the values.yaml config template

helm show values defaults

2 min read | by Jordi Prats

To configure a helm chart one of the firsts steps always is to set our customizations. To do se we will need to retrive the default values.yaml. To set the values using the --set option is not really practical and can lead to errors if we push changes forgetting to set some values

Futhermore, if you are working on a using helm with terraform you will nee the values.yaml to start working on the template.

To do so we can use the command helm show values for any chart. This command inspects a chart (directory, file, or URL) and retrieves the contents of the values.yaml file. For example, for the datadog helm chart:

$ helm show values datadog/datadog
## Default values for Datadog Agent
## See Datadog helm documentation to learn more:
## https://docs.datadoghq.com/agent/kubernetes/helm/

# nameOverride -- Override name of app
nameOverride:  # ""
(...)

But it also works for a local chart as well, even though getting the values.yaml for a local chart it's just a matter of copying the file:

$ helm show values .
# Default values for ampa.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

static:
  replicaCount: 1

app:
  replicaCount: 1
(...)

Posted on 26/03/2021

Categories