<p>I have this section in my service template. I want, if variable publicIP is defined, define loadBalancerIP.</p>
<pre><code>  {{- if .Values.publicIP }}
  loadBalancerIP: {{ .Values.publicIP }}
  {{- end }}  
</code></pre>
<p>in my values.$environment.yml</p>
<p>I define</p>
<p>publicIP: null</p>
<p>And I need to define publicIP when I do helm install, for example:</p>
<pre><code>helm install release release/path -f values.$environment.yml  -—set publicIP=127.0.0.1
</code></pre>
<p>But it isn't working. What can I do to define publicIP and it defines in my template?</p>

<p>I am not sure I understand the question but if you want to set an individual parameter you need to do it with</p>
<blockquote>
<p>&quot;--set&quot;</p>
</blockquote>
<p>eg : <code>helm install --set foo=bar ./mychart</code></p>
<hr />
<p>What is the name of your values.yml? values.$environment.yml?
Try also command like this</p>
<pre><code>helm install release release/path -f --values {YOUR_VALUES_FILE}.yml  --set publicIP=127.0.0.1
</code></pre>
<p>and be sure to use --, you seem in the example provided to use a weird special character much longer than a normal dash.</p>
<p>And second is <strong>publicIP</strong> a root parameter?
if you  have something like this in {YOUR_VALUES_FILE}.yml</p>
<pre><code>root
  node: null
</code></pre>
<p>you need to set it like this :</p>
<pre><code>helm install release release/path -f --values {YOUR_VALUES_FILE}.yml  --set root.node=value
</code></pre>
