<p>I have pods who deployed to Kubernetes cluster (hosted with Google Cloud Kubernetes). Those pods are using some <code>secret</code>, which are plain text files. I added the secret to the <code>yaml</code> file and deployed the deployment. The application is working fine.</p>

<p>Now, let say that someone compromised my code and somehow get access to all my files on the container. In that case, the attacker can find the <code>secrets</code> directory and print all the secrets written there. It's a plain text.</p>

<h2>Question:</h2>

<p>Why it more secure use kubernetes-secrets instead of just a plain-text?</p>

<p>There are different levels of security and as @Vishal Biyani says in the comments, it sounds like you're looking for a level of security you'd get from a project like Sealed Secrets. </p>

<p>As you say, out of the box secrets doesn't give you encryption at the container level. But it does give controls on access through kubectl and the kubernetes APIs. For example, you could use role-based access control so that specific users could see that a secret exists without seeing (through the k8s APIs) what its value is.</p>
