本文介绍了如何用掌舵设定多个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用 helm
安装可以在安装图表时设置值,例如:
Use helm
install can set value when install a chart like:
helm install --set favoriteDrink=slurm ./mychart
现在想要设置以下值:
helm install --set aws.subnets="subnet-123456, subnet-654321" ./mychart
但失败:
Error: failed parsing --set data: key " subnet-654321" has no value
似乎 helm
的-设置
知道逗号,
并检查下一个字符串作为键。这样设置字符串时不能在这种情况下使用吗?
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?
helm install charts/mychart \
--set aws.subnets={subnet-123456,subnet-654321}
错误:
Error: This command needs 1 argument: chart name
这种方式有效
This way works
helm install charts/mychart \
--set aws.subnets="subnet-123456\,subnet-654321"
参考
Reference
推荐答案
根据,您可以使用花括号设置多个值,例如:
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}
这篇关于如何用掌舵设定多个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!