Search code examples
ibm-cloud-private

How can I create IBM Cloud Private namespaces, together with PSPs using the commandline?


I want to create namespaces in IBM Cloud Private 3.1.1 using the cli. These namespaces need to be associated with pod security policies. I don't see this as a documented capability in the cloudctl commandline.


Solution

  • You can refer below ICP documentation to add the PSP to a namespace by CLI. https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.1/user_management/psp_addbind_ns.html

    The command likes below:

    kubectl -n appsales create rolebinding ibm-anyuid-clusterrole-rolebinding --clusterrole=ibm-anyuid-clusterrole --group=system:serviceaccounts:appsales

    Or you can refer below ICP documentation for more details. https://www.ibm.com/support/knowledgecenter/SSBS6K_3.1.1/app_center/nd_helm.html

    Happy new year.