Preparing a namespace for the operator

All instances of an operator need a namespace on all Kubernetes clusters. Depending on your platform type, either prepare the namespace on OCP, ROKS, or a namespace on other CNCF Kubernetes platforms.

About this task

You need to create the necessary namespace or project for the operator:
  • If you do not plan to use the deployoperator.py script to install the operator.
  • Or, if you want to manually create the project or namespace before you plan to run the script.

Procedure

  1. Open a terminal or command prompt and log in to the target cluster as the <cluster-admin> user.
  2. Create a namespace for the operator deployment.
    • For OpenShift deployments

      You can use an existing namespace in the cluster or create a new namespace. You can create a namespace 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 namespace, change the scope in the OpenShift cluster to the new namespace (fncm-project).

      oc project <project_name>
    • For CNCF deployments
      You can use an existing namespace in the cluster or create a new namespace. You can create a project in the Kubernetes console interface or on the Kubernetes CLI by running the following command.
      kubectl create namespace <namespace_name>

      You can save the namespace that you created for all subsequent kubectl commands that you use in the same context by running the following command:

      kubectl config set-context --current --namespace=<namespace_name>
      To validate the current context, use this command:
      kubectl config view --minify | grep namespace:

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.