Using the Command Line to Override Defaults
Sometimes you may want to change specific default settings like the blog name or email address. Rather than modifying the values.yaml file directly, you can use the--set option on the command line to override these values. For instance, to change the blog name, run:
--set options to override any parameter from the default configuration. Below is an excerpt from the default values for reference:
Using a Custom Values File
For scenarios where multiple settings need to be overridden, it may be more efficient to create your own custom values file. Follow these steps:-
Create a file named
custom-values.yamlwith your desired configuration: -
Install the chart with your custom values file using the following command:
Modifying the Built-in values.yaml Directly
For a more permanent configuration change, you might choose to modify the chart’s built-in values.yaml file. To do this, you first need to pull the chart locally. Begin by downloading the chart archive:- Unarchive the file manually
-
Use the
--untaroption:
wordpress) containing all chart files, including values.yaml. Here is a sample view of its contents:
values.yaml file might appear:
When installing from a local chart directory, the Helm installation command accepts both a repository chart name or a file path.
Summary
In this article, we explored three effective methods to customize your WordPress deployment using Helm:- Overriding default values with command line parameters using the
--setoption. - Employing a custom values file via the
--valuesoption. - Modifying the built-in
values.yamlfile by pulling and editing the chart locally.