<p>I'm trying to store a string array as a secret; I have this <code>secrets.yml</code> file that I'm using in my local environment and works perfectly (values are for explanation purposes only):</p>

<p><strong>secrets.yml</strong></p>

<pre class="lang-yaml prettyprint-override"><code>passwordz:
  - pass_001
  - pass_002
  - pass_003
</code></pre>

<p>The idea is to be able to store multiple passwords, and I want to use them as part of a k8s secret but had no luck so far; something like this:</p>

<p><strong>k8s-secrets.yml</strong></p>

<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Secret
metadata:
  name: master-passwordz
type: Opaque
data:
  secrets.yml: |-
    passwordz: CiAgLSBwYXNzXzAwMQogIC0gcGFzc18wMDIKICAtIHBhc3NfMDAz

</code></pre>

<p>At the time to try to apply this secret:</p>

<pre class="lang-sh prettyprint-override"><code>kubectl apply -f ./k8s-secrets.yml

</code></pre>

<p>I'm getting the following error:</p>

<pre><code>Error from server (BadRequest): error when creating "k8s-secrets.yml": Secret in version "v1" cannot be handled as a Secret: v1.Secret.ObjectMeta: v1.ObjectMeta.TypeMeta: Kind: Data: decode base64: illegal base64 data at input byte 3
</code></pre>

<p>Any idea if it's possible to accomplish this?</p>

Cas1337
<p>Could you try using "stringData" instead of "data". AFAIK this key should be used when you don't provide complete base64 encoded data in Secrets.</p>
