How to create multiple values files inside helm chart?
Helm Chart is a very feature-rich framework when you are working with complex Kubernetes cluster and deployment. Helm chart provides a very convenient way to pass
values.yaml and use it inside your Helm Chart.
But for this article, we will focus on -
How to create multiple values files inside the helm chart?
Click on the blog post if you want to know more about How to pass environment variables inside your helm chart ?
Table of Content
- Create multiple values.yaml(e.g.
- Run Helm Install with multiple values.yaml
1. Create multiple values.yaml(e.g. my-first-value.yaml, my-second-value.yaml)
The first which we need to do is to create multiple
values.yaml. So I will be creating two files -
The aim of both files to increase the replica count of my helm chart. So I will be defining the attribute
replicaCount in both files.
Like I said we are trying to learn the concept here, but in your case, you can fill in any attribute as per your requirement into your
1.1 Lets update my-first-value.yaml
As I said we are going to update the replica count, so first I am gonna put the replica count to
You must save the file before closing it.
1.2 Secondly update my-second-value.yaml
In this file, we are going to increase the replica count to
3. Although we are using the same attribute in both the files but you can insert some different attribute values based on your business need.
2. Run Helm Install with multiple values.yaml
Now we have created multiple values.yaml .i.e. -
my-first-value.yaml, my-second-value.yaml, its time to use both the files inside your
helm install command.
Here the command for installing the helm chart using multiple values.yaml
1helm install -f my-first-value.yaml -f my-second-value.yaml helloworldrelease helloworld
How to understand the command?
helm install- You need to use this because you are trying to install the helm chart
-f my-first-value.yaml -f my-second-value.yaml- This is how we pass multiple value.yaml inside helm install command
helloworldrelease- It is a release name that can anything of your choice
helloworld- Your actual helm chart name.
Hope this article helps you to build your understanding around using multiple values.yaml
For more similar discussion you can read more from the following threads -
Read More -
- Helm chart - How to Add/Install plugins
- Getting started with Helm Chart
- Helm chart - WordPress Installation with MariaDB on Kubernetes
- Helm chart - Build you first helm chart with Spring Boot
- Helm Chart - Convert Kubernetes YAML into Helm Chart YAML
- Helm Chart - Pass environment variables
- Helm Chart - Plugin
- Helm Chart - Dry Run Install
- Helm Chart - How to create multiple values files inside helm chart?