Configuring tethered namespaces for the Db2 service

You can configure tethered namespaces for your Db2 databases to isolate specific databases or workloads.

Before you begin

You must tether your project to the IBM® Software Hub control plane. For more information, see Tethering projects to the IBM Software Hub control plane

About this task

Only include databases you want tethered in your tethered project.

Procedure

  1. Apply a patch to your Db2 instance by running the following command:
    oc patch Db2oltpservice db2oltp-cr -n${PROJECT_CPD_INST_OPERANDS}  --type merge -p '{"spec":{"tetheredNamespaces":["${PROJECT_DB2_INSTANCE_TETHERED}"]}}'
  2. Check your instance is ready for use by running the following command:
    cpd-cli manage get-cr-status --cpd_instance_ns=${PROJECT_CPD_INST_OPERANDS} --components=db2oltp

Results

You can now create new databases in your tethered project using the IBM Software Hub web client or with the command-line interface. For more information, see Creating a service instance for Db2.