<p>My pod is running with the default service account. My pod uses secrets through mounted files and config maps but this is defined in yaml and the pod does not contain kubectl or similar component.</p>
<p>Is there a point of using RBAC for anything if I don't call the API? The best practices state &quot;Enable or configure RBAC rules that restrict reading data in Secrets (including via indirect means).&quot;</p>

Lemon Sky
<p>Only things that call the Kubernetes API, like the <code>kubectl</code> command and the various Kubernetes SDK libraries, use RBAC.  For your basic application, you as the user need permission to create deployments, create secrets, <em>etc.</em> but if you have cluster-administrator permissions you don't need anything special setup.</p>
<p>You could imagine an orchestrator application that wanted to farm out work by creating Kubernetes Jobs.  In this case the orchestrator itself would need an RBAC setup; typically its Helm chart or other deployment YAML would contain a Role (to create Jobs), a ServiceAccount, and a RoleBinding, and set its own Deployment to run using that ServiceAccount.  This isn't the &quot;normal&quot; case of a straightforward HTTP-based application (Deployment/Service/Ingress) with a backing database (StatefulSet/Service).</p>
<blockquote>
<p>... restrict reading data in Secrets ...</p>
</blockquote>
<p>If you can <code>kubectl get secret -o yaml</code> then the Secret values are all but there to read; they are base64 encoded but not encrypted at all.  It's good practice to limit the ability to do this.  This having been said, you can also create a Pod, mounting the Secret, and make the main container command be to dump out the Secret value to somewhere readable, so even then Secrets aren't <em>that</em> secret.  It's still a good practice, but not required <em>per se</em>, particularly in an evaluation or test cluster.</p>
