Kubernetes version: 1.18
Cloud being used: bare-metal
Host OS: OS centos
We have a use case where we want to assign a specific pod within a namespace to a different psp and all the other pods within the same namespace to a different psp. May I know the way where we can create role bindings for the restricted service account?
For example in namespace abc we have 10 pods deployed and in that one pod has root access. So we have created 2 psp , one restricts the deployment of pods which has root access and the other psp that deploys pods which doesnt have root access. We are deploying all the 10 pods within the same namespace but 1 pod has root access and the other 9 doesnt have.
In the above scenario, instead of defining 2 role binding file, is there a way where I can mention like restrict a service account within this namespace inside the subjects section?
You can format your yaml by highlighting it and pressing Ctrl-Shift-C, it will make your output easier to read.