Is there a way to deploy one template from the helm chart? helm upgrade --install has to be applied to the chart, but I want to deploy only one file, lets say configmap.yaml. When I run kubectl apply -f configmap.yaml, I get an error: error converting YAML to JSON: yaml: line 5: did not find expected node content because there are variables fetched from _helpers.tpl: {{ include "templatename.fullname" . }}. Using helm 3.
you could try this command:
helm template -s templates/configmap.yaml . | kubectl apply -f -
Found I can do it this way:
In config.yaml:
...
labels:
my-label: abc
Then use the -l filter option of kubectl to choose only those objects that have this label.
helm template name charts/chartname/charts/name --values values.yaml | kubectl apply -f - -l my-label=abc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With