Installing IBM Cloud Pak foundational services in multiple namespaces

You can install multiple foundational services instances in your cluster.

Multiple foundational services instances capability is supported. See the following sections before you use this capability:

The IBM Cloud Pak foundational services operator, including the Operand Deployment Lifecycle Manager and all of the foundational services, by default, are installed only in the ibm-common-services namespace. If you want to install multiple foundational services instances in other namespaces, create the common-service-maps configmap in the kube-public namespace, and update it with the IBM Cloud Paks® and foundational services namespace information.

Requirements and limitations

Planning your installation

Preparing your cluster

You must prepare your cluster to meet the requirements for the number of foundational services instances that you are installing. For more details on the requirements of one instance of foundational services, see the following topics:

Creating the configmap

Important: You must create or update the common-service-maps configmap before you start installing your IBM Cloud Paks and foundational services instances.

You can create the common-service-maps configmap by using the OpenShift cluster console or the command-line interface (CLI). In the configmap, you can map the IBM Cloud Pak and its foundational services instance in the namespaceMapping section.

Following descriptions provide more details on the configmap parameters:

Create the configmap by using the OpenShift cluster console

You must complete these tasks from your OpenShift cluster console.

  1. Log in to your OpenShift cluster console.
  2. Click the plus icon. You see the Import YAML dialog box.
  3. Paste the following configmap definition into the dialog box and replace the namespace value with your custom namespaces.

     apiVersion: v1
     kind: ConfigMap
     metadata:
       name: common-service-maps
       namespace: kube-public
     data:
       common-service-maps.yaml: |
         controlNamespace: cs-control
         namespaceMapping:
         - requested-from-namespace:
           - <IBM Cloud Pak-1-namespace>
           map-to-common-service-namespace: <foundational services-namespace-1>
         - requested-from-namespace:
           - <IBM Cloud Pak-2-namespace>
           map-to-common-service-namespace: <foundational services-namespace-2>
    
  4. Click Create. The common-service-maps configmap is created in the kube-public namespace.

Create the configmap by using the command-line interface (CLI)

You must complete these tasks from your OpenShift cluster node.

  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:

     apiVersion: v1
     kind: ConfigMap
     metadata:
       name: common-service-maps
       namespace: kube-public
     data:
       common-service-maps.yaml: |
         controlNamespace: cs-control
         namespaceMapping:
         - requested-from-namespace:
           - <IBM Cloud Pak-1-namespace>
           map-to-common-service-namespace: <foundational services-namespace-1>
         - requested-from-namespace:
           - <IBM Cloud Pak-2-namespace>
           map-to-common-service-namespace: <foundational services-namespace-2>
    
  3. Create the configmap.

     oc apply -f common-service-maps.yaml
    

The common-service-maps configmap is created in the kube-public namespace.

Editing the configmap

You can change the namespace mapping after you install foundational services. However, the following conditions apply:

What's next

Install foundational services.

Important: In each foundational services instance namespace that you add in the common-service-maps configmap, you must complete the following tasks:

  1. Install the IBM Cloud Pak operator in each requested-from-namespace namespace.
  2. Update the CommonService custom resource (CR) with the hardware profile and configurations of individual services.
    • If you have a cluster-scoped operator in the controlNamespace, it picks the largest hardware profile across all the CommonService custom resources in the cluster, and sets it as the hardware profile for the cluster. For example, the License Service and Certificate Manager operators.
    • If you have a namespace-scoped operator, it sets the hardware profile based on the CommonService custom resource in the namespace.
  3. Create an OperandRequest with the services that you want to install in the foundational services instance.

You can install the following services in multiple namespaces:

Note: Even though you install multiple instances of the License Service or Certificate Manager service, only one instance each is installed in the cluster. Irrespective of where you create the OperandRequest, these two services are installed in the namespace that you specify as the controlNamespace parameter value in the common-service-maps configmap. The largest configured resources limits (CPU and memory) of these services across the cluster are applied to the instances that are in the controlNamespace.