<p>I was trying to add to a pod a list of values inside one key as a label, thing is it doesn't really work, when I try to do <code>kubectl edit po/sektor -o yaml</code> 
(sektor is pod name) and then in labels section I edited the "abilities" label like this:</p>

<pre><code>  labels:
    abilities:
        - ability1: fire
        - ability2: teleport
        - ability3: rocekts
</code></pre>

<p>but when I try to save it shows me the following error:
Invalid value: "The edited file failed validation": ValidationError(Pod.metadata.labels.abilities): invalid type for io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta.labels: got "array", expected "string"</p>

<p>So I see that I need to change the type of that label somehow but I can't figure out how.</p>

<p>If it's possible, anyone knows how?</p>

<p>This is not possible because of the definition of <code>Labels</code>. According to the <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/" rel="nofollow noreferrer">documentation</a> <code>Labels</code> are key/value pairs. What you could do there tho, would be to have something like this:</p>

<pre><code>labels:
  ability-fire: true
  ability-teleport: true
  ability-rockets: true
</code></pre>

<p>With this way you can easily create <a href="https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors" rel="nofollow noreferrer">Selectors</a> for your other Resources like <code>Services</code>.</p>
