3 ms·
> at that point it's still sitting there mounted and they can read the file? Yes, if someone has exec access into your container, they'll be able to see the se
by FridgeSeal 6y ago
> at that point it's still sitting there mounted and they can read the file?
Yes, if someone has exec access into your container, they'll be able to see the secret, unless you do something like making the K8s secret an already encrypted blob, and then in process decrypting it again and reading it. If someone's got exec access to your container though, you've got bigger problems.
> Or do we just accept that you have to treat anyone with access to kubectl as authorised to know your private cert ?
You can set up access so that someone can login with Kubectl but still only be readonly, and you can preclude read ("get") access to secrets to the readonly role, so they won't be able to view the contents of the secret.
- GauntletWizard 6y agoThere’s a default “view” clusterrole (don’t let the name fool you - you can bind it in a namespace with a RoleBinding instead of ClusterRoleBinding and provide view only for that namespace) that K8s defines, that specifically excludes read permissions on secrets. Use that.