Skip to main content
In this guide, you’ll learn how to customize chart parameters during a Helm chart installation. When you deploy WordPress using the Bitnami chart, it uses the default values defined in the chart’s values.yaml file. For example, the default blog name is set as “User’s Blog!” in the values file. This article explains how this value is configured and outlines the various methods available for overriding it.

Understanding the Default Configuration

The WordPress application is deployed using a Kubernetes Deployment resource. Its configuration is partly derived from the values set in values.yaml. Below is a snippet from the values.yaml file indicating the default settings:
The corresponding Deployment template uses these values to configure the environment variables. For example, the WORDPRESS_BLOG_NAME is set as follows:
The WORDPRESS_BLOG_NAME environment variable is directly set using the value from values.yaml, meaning that the application will deploy with “User’s Blog!” as the default blog name unless it’s overridden.

Overriding Default Values with Command-Line Parameters

When you install WordPress with Helm, the chart deploys using the default values from the values.yaml file. To override these defaults on the fly, you can use the --set option with the helm install command. For example, to change the blog name from “User’s Blog!” to “Helm Tut”, use the following command:
You can override multiple parameters simultaneously. For instance, you may adjust both the WordPress blog name and the user email. Command-line parameters provided using --set will take precedence over the defaults defined in the values.yaml file.

Using a Custom Values File

For numerous parameter overrides, maintaining a custom values file is more efficient than using multiple --set options. Follow these steps:
  1. Create a file named custom-values.yaml with your custom configurations:
  2. Deploy the chart using the custom values file by running:
This instructs Helm to apply the configuration from custom-values.yaml, thereby overriding the corresponding default values.

Modifying the Built-in values.yaml File

If you wish to modify the built-in values.yaml within the chart itself, you can do so by following these steps:
  1. Use helm pull to download the chart in an archived (compressed) form:
  2. To automatically uncompress the chart into a directory, use the --untar option:
  3. List the directory to view the chart files, including values.yaml:
  4. Open and edit the values.yaml file in your preferred text editor to set your custom configurations.
  5. Install the chart locally by referencing the modified chart path:
In this command, ./ indicates the current directory, and Helm installs the chart using your modified files.
When modifying the built-in values.yaml file, ensure you maintain the correct file structure to avoid deployment issues.

This concludes our discussion on customizing chart parameters. You have learned how to override default values in a Bitnami WordPress Helm chart using command-line options with --set, by employing a custom values file, or by directly modifying the chart’s source after pulling it locally. For more details on Helm and managing Kubernetes resources, explore the official Helm documentation and Kubernetes Basics.

Watch Video

Practice Lab