Deploy only one template from the helm chart

Viewed 4702

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.

2 Answers

Found I can do it this way:

helm template name charts/chartname/charts/name --values values.yaml | kubectl apply -f - -l key=value

you could try this command:

helm template -s templates/configmap.yaml . | kubectl apply -f -
Related