<p>I am trying to add labels to the nodes using helm chart, however getting error while deploying.</p>
<p>yaml template</p>
<pre><code>
apiVersion: v1
kind: Node
metadata:
  name: {{ index (lookup &quot;v1&quot; &quot;Node&quot; &quot;&quot; &quot;&quot;).items 0 &quot;metadata&quot; &quot;name&quot; }} 
  labels:
    content-strange: &quot;true&quot;
  name: {{ index (lookup &quot;v1&quot; &quot;Node&quot; &quot;&quot; &quot;&quot;).items 1 &quot;metadata&quot; &quot;name&quot; }}
  labels:
    content-strange: &quot;true&quot;
  name: {{ index (lookup &quot;v1&quot; &quot;Node&quot; &quot;&quot; &quot;&quot;).items 2 &quot;metadata&quot; &quot;name&quot; }}
  labels:
    content-strange: &quot;true&quot;
</code></pre>
<p>Error</p>
<pre><code>helm install famous famous.1.1.tgz -n famous-ns1
Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: Node &quot;10.x.x.x&quot; in namespace &quot;&quot; exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key &quot;app.kubernetes.io/managed-by&quot;: must be set to &quot;Helm&quot;; annotation validation error: missing key &quot;meta.helm.sh/release-name&quot;: must be set to &quot;famous&quot;; annotation validation error: missing key &quot;meta.helm.sh/release-namespace&quot;: must be set to &quot;famous-ns1&quot;
</code></pre>

Nishant Chauhan
<p>You can't use Helm to modify existing objects.  Helm works by running its templating engine to construct complete Kubernetes manifests, and them submits them to the cluster.  This process assumes that an object is wholly owned by Helm, and these objects don't already exist, and nothing other than <code>helm upgrade</code> will modify them.</p>
<p>The error you're getting here is in fact because the Node objects already exist; Kubernetes creates them when the actual nodes (physical machines, cloud instances, VMs) get created and are joined to the cluster.  You can't modify these using Helm.</p>
