<p>I'm trying to edit a kubernetes secret using:</p>

<pre><code>kubectl edit secret mysecret -o yaml
</code></pre>

<p>And adding a new variable on <code>data</code>:</p>

<pre><code>data:
  NEW_VAR: true
</code></pre>

<p>But I receive the error:</p>

<blockquote>
  <p>cannot restore slice from bool</p>
</blockquote>

<p>If I try to use some number, like:</p>

<pre><code>data:
  NEW_VAR: 1
</code></pre>

<p>I receive another error after close the editor:</p>

<blockquote>
  <p>cannot restore slice from int64</p>
</blockquote>

<p>What this error means?</p>

Dherik
<p>This error happens when the variable is not a valid <strong>base64</strong> value.</p>

<p>So, to use the value <code>true</code>, you need to use his base64 representation:</p>

<pre><code>NEW_VAR: dHJ1ZQ==
</code></pre>
