How to set multiple values with helm?

online picture online · Jan 18, 2018 · Viewed 27.9k times · Source

Use helm install can set value when install a chart like:

helm install --set favoriteDrink=slurm ./mychart

Now want to set value like:

helm install --set aws.subnets="subnet-123456, subnet-654321" ./mychart

But failed:

Error: failed parsing --set data: key " subnet-654321" has no value

It seems that helm's --set know comma , and check the next string as a key. So can't use in this case when set such string?


Tested this way

helm install charts/mychart \
    --set aws.subnets={subnet-123456,subnet-654321}

Got error:

Error: This command needs 1 argument: chart name

This way works

helm install charts/mychart \
    --set aws.subnets="subnet-123456\,subnet-654321"

Reference

https://github.com/kubernetes/helm/blob/master/docs/using_helm.md#the-format-and-limitations-of---set

Answer

Javier Salmeron picture Javier Salmeron · Jan 18, 2018

According to https://github.com/kubernetes/helm/issues/1987#issuecomment-280497496, you set multiple values using curly braces, for example:

--set foo={a,b,c}

So, in your case it would be like this

--set aws.subnets={subnet-123456,subnet-654321}