Adding a Pod Security Policy binding to a namespace
You can add a Pod Security Policy binding to a namespace.
Complete the following steps to add a Pod Security Policy to a namespace:
-
Log in as the cluster administrator.
-
Add a Pod Security Policy binding to a namespace. For example, create a Role Binding in the
appsales
namespace to theibm-anyuid-psp
Pod Security Policy. Run the following command:''' kubectl -n appsales create rolebinding ibm-anyuid-clusterrole-rolebinding --clusterrole=ibm-anyuid-clusterrole --group=system:serviceaccounts:appsales '''
See Managing namespace bindings to Pod Security Policies for more details.