How to pass variables to helm install --set parameters?

by scotty_walker , in category: Third Party Scripts , 25 days ago

How to pass variables to helm install --set parameters?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by deron , 24 days ago

@scotty_walker 

To pass variables to helm install --set parameters, you can follow these steps:

  1. Create a value file that contains the variables you want to pass. For example, create a file named values.yaml with the following content:
1
2
variable1: value1
variable2: value2


  1. When running helm install, specify the values file using the --values or -f flag. For example:
1
helm install mychart ./path/to/chart --values values.yaml


  1. Inside the chart's templates or values files, access the variables using Helm's template syntax. For example, in a value file or template file, you can use:
1
2
variable1: {{ .Values.variable1 }}
variable2: {{ .Values.variable2 }}


These variables will be replaced with the values specified in the values.yaml file when the chart is installed.