Why does k8s secrets need to be base64 encoded when configmaps does not? : <p>Why does k8s secrets need to be base64 encoded when configmaps does not?</p>

<p>When creating a configmap you simply do somthing like this:</p>

<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: my-configmap
data:
  SOME_KEY: a string value
</code></pre>

<p>But when you want to create a secret you have to 
<code>echo -n "some secret string" | base64</code> and then put the result of that in a file looking something like this:</p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: my-secret
type: Opaque
data:
  SOME_KEY: c29tZSBzZWNyZXQgc3RyaW5n
</code></pre>

<p>I really wonder why there is this difference? Are kubernetes secrets simply base64 encoded strings? I would expect that secrets were stored encrypted in kubernetes. </p>
