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:

  1. Log in as the cluster administrator.

  2. Add a Pod Security Policy binding to a namespace. For example, create a Role Binding in the appsales namespace to the ibm-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.