You can configure tethered namespaces for your Db2 databases to isolate
specific databases or workloads.
About this task
Only
include databases you want tethered in your tethered project.
Procedure
-
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}"]}}'
- 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
Wait for the status to show Completed.
This indicates that the operator has reconciled the updated configuration successfully.
- Reinstall the Db2 operator to apply updated tethered namespaces:
cpd-cli manage install-components \
--license_acceptance=true \
--components=db2oltp \
--release=${VERSION} \
--operator_ns=${PROJECT_CPD_INST_OPERATORS} \
--instance_ns=${PROJECT_CPD_INST_OPERANDS} \
--tethered_instance_ns=${PROJECT_CPD_INSTANCE_TETHERED_LIST} \
--block_storage_class=${STG_CLASS_BLOCK} \
--file_storage_class=${STG_CLASS_FILE} \
--image_pull_prefix=${IMAGE_PULL_PREFIX} \
--image_pull_secret=${IMAGE_PULL_SECRET}
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.