Installing IBM Cloud Pak foundational services in a custom namespace

You can install IBM Cloud Pak foundational services in a namespace of your choice.

The IBM Cloud Pak foundational services operator, including the Operand Deployment Lifecycle Manager and all of the foundational services, by default, are installed in the ibm-common-services namespace. If you want to install the Operand Deployment Lifecycle Manager and foundational services in any other namespace, create a configmap with the namespace information.

See these important notes:

  • You must create this configmap before you install your IBM Cloud Pak.
  • You can install foundational services in a custom namespace only if you are installing them for the first time in your cluster. You cannot migrate foundational services to another namespace by updating the configmap if they are already installed in your cluster.
  • You can install multiple instances of foundational services in one cluster only if you are using foundational services version 3.23 or higher, or foundational services version 3.19.9 or a higher 3.19.x version.

You can use the OpenShift cluster console or the command-line interface (CLI) to create the configmap.

Provide the following information in the configmap:

  • Specify the namespace where you plan to install your IBM Cloud Pak in the requested-from-namespaces section. If you plan to install multiple IBM Cloud Paks in your cluster, you can specify multiple namespaces. Important: You must install your IBM Cloud Pak in the namespace that you specified in the requested-from-namespaces section. Otherwise, your IBM Cloud Pak won't have access to the foundational services.
  • In the map-to-common-service-namespace section, specify the namespace where you want to install foundational services. All IBM Cloud Paks that you added in the requested-from-namespaces section request foundational services that are installed in this custom namespace.
  • In the defaultCsNs section, you do not need to change ibm-common-services. This is the registry namespace of the OperandRequest that your IBM Cloud Pak generates. When you install foundational services in a custom namespace, the IBM Cloud Pak foundational services operator replaces this registry namespace with the namespace that you specify in the map-to-common-service-namespace section.

Important: If you install foundational services in a custom namespace, you must use -n <your-custom-common-services-namespace> when you run commands instead of the default -n ibm-common-services.

Create the configmap by using the OpenShift cluster console

Complete these steps from your OpenShift cluster console:

  1. Click the plus icon to open the Import YAML dialog box.
  2. Paste the following configmap definition into the dialog box and replace the namespace value with your custom namespace.
     apiVersion: v1
     kind: ConfigMap
     metadata:
       name: common-service-maps
       namespace: kube-public
     data:
       common-service-maps.yaml: |
         namespaceMapping:
         - requested-from-namespace:
           - <your-IBM Cloud Pak-1-namespace>
           - <your-IBM Cloud Pak-2-namespace>
           map-to-common-service-namespace: <custom-namespace-to-install-common-services>
         defaultCsNs: ibm-common-services
    
  3. Click Create. The configmap is created in the kube-public namespace.

Next, complete foundational services installation.

Create the configmap by using the CLI

Run these commands:

  1. Log in to the cluster by using the oc login command.

  2. Create a YAML file named common-service-maps.yaml with the following definition.

     namespaceMapping:
     - requested-from-namespace:
       - <your-IBM Cloud Pak-1-namespace>
       - <your-IBM Cloud Pak-2-namespace>
       map-to-common-service-namespace: <custom-namespace-to-install-common-services>
     defaultCsNs: ibm-common-services
    
  3. Create the configmap.

    oc create configmap common-service-maps --from-file=./common-service-maps.yaml -n kube-public
    

The configmap is created in the kube-public namespace.

Next, complete foundational services installation. For more information, see Installing IBM Cloud Pak foundational services by using the CLI.