title: kubectl label - How to label "spec : template : metadata : labels"
body: <p>Ho do you set the following label in an already applied deployment?</p>
  
  <pre><code>kubectl label deployments my-deployment-v1 app=my-deployment
  </code></pre>
  
  <p>Is setting:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: my-deployment-v1
    labels:
      app: my-deployment
  </code></pre>
  
  <p>And I need, the following for a service to find it:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: my-deployment-v1
  spec:
    template:
      metadata:
        labels:
          app: my-deployment
  </code></pre>