Choosing between --set and --values
When we installed WordPress earlier, we used the --values
flag to pass parameters to the Helm chart. However, there are two ways to pass values:
- To pass a value explicitly from the command line, use the following command:
--set
- To specify values from a YAML file or URL, use the following command:
--values
In this book, we will treat the --values
flag as the preferred method of configuring chart values. The reason for this is that it is easier to configure multiple values when they are contained in a YAML file. Maintaining a values
file also makes it simple to save these assets in a Source Code Management (SCM) system, such as Git
, which allows installations to be easily reproducible. However, take note that sensitive values, such as passwords, should never be stored in a source control repository. When secrets need to be provided, the recommended approach is to use the --set
flag to prevent them from being committed to source control...