Preparing a namespace for the Cloud Pak operator

All instances of an operator need a namespace whether it is on a private cloud (OCP) or on IBM Cloud® Public (ROKS). Depending on your platform type, either prepare the namespace on OCP or on ROKS.

About this task

If you plan to use the Operator Hub in the OCP console, then you must create the necessary namespace for the operator. You can create a namespace before or when you run the cluster setup script.

Note: If you plan to run the cluster setup script, you do not need to create the project beforehand. If you prefer, you can create a new project by using the script.


  1. Log in to your cluster.
    Use the oc command line interface for OpenShift container platforms.
    To log in to your OCP cluster.
    oc login https://<cluster-ip>:<port> -u <cluster-admin> -p <password>

    Where the <cluster-ip>:<port> is the IP address and port number of the cluster, and the <password> is your password for your <cluster-admin> user.

    The following command shows an example cluster URL and port.

    oc login -u admin -p admin_pwd
    To log in to your ROKS cluster.
    oc login --token=<token> --server=https://<cluster-ip>:<port>

    Where the <token> is your API token for your user on the cluster, and <cluster-ip>:<port> is the IP address and port number of the cluster. You can get these values by clicking Copy Login Command in the OCP console.

    The following example command shows that the token is an almost-unique fixed-size 256-bit (32-byte) hash.

    oc login --token=sha256~5a0GogeS4oEUfG5yFCcPE2Qf-rz5exEUiFaZ4V0Iy1Y --server=
  2. Create a namespace for the operator and CP4BA deployment.

    You can use an existing project in the cluster or create a new namespace. You can create a project in the OpenShift console or on the OCP CLI by running the following command.

    oc new-project <project_name> --description="<description>" --display-name="<display_name>"

    If you do create a project, change the scope in the OpenShift cluster to the new project (cp4ba-project).

    oc project <project_name>
    Note: If you plan to use the All namespaces option to install the Cloud Pak operator, then you must have another project in addition to openshift-operators in the cluster before you create the deployment. If you do not have a project for the deployment, then create one. The only way that you can install Cloud Pak for Business Automation in All Namespaces is by using the OCP console.

What to do next

You can now check that you have access to the container images. For more information, see Getting access to images from the public IBM Entitled Registry.