I have this values in a yaml for a helm chart:
controller:
nodeSelector:
node-role.kubernetes.io/master: 'true'
But I want to install the chart just using one command without the file.
I've tried this without result:
helm install A B \
--set "controller.nodeSelector[0].node-role.kubernetes.io/master='true'"
zsh: zsh: command not found: --set
Seeing this I thought it was a problem of the terminal
bash: json: cannot unmarshal array into Go struct field PodSpec.spec.template.spec.nodeSelector of type map[string]string
I assume the problem is nodeSelector[0]
. Having [0] makes Helm assume it is an array, but when looking at the yaml it doesn't look like an array. So try this instead:
helm install A B --set "controller.nodeSelector.node-role\\.kubernetes\\.io/master=true"
You will have to escape .
.