Deploy Db2 or Db2 Warehouse by using Helm templates

You can use Helm templates to simplify the deployment of Db2 or Db2 Warehouse instances. Helm templates are preconfigured deployment specifications that generate Db2uInstance custom resources with common settings.

Before you begin

Note: This topic is for Db2 Operator V2 deployments. If you are currently using a legacy deployment, refer to the documentation in Legacy deployment documentation. If you are unsure which deployment type you are using, use the version checker.

Before you begin, ensure that the Db2 Operator is installed in your cluster.

Procedure

To use these templates to generate a Db2uInstance CR:

  1. Run the following command:
    helm template ibm-helm/db2-instance \
      --set name=mynewdb2instance \
      --set storageclassname.rwx=<RWX_STORAGECLASS> \
      --set storageclassname.rwo=<RWO_STORAGECLASS> \
      --set image.tag="v12.1.5.0" \
      --output-dir .
    Important: Set the values for storageclassname to match the storage on your cluster for both RWX and RWO.
  2. Inspect the CR to ensure the configuration matches your goals.
  3. Apply one or both of the following commands to apply the created custom resource as required:
    kubectl -n DB2_INSTANCE_NAMESPACE apply -f ./db2-instance/templates/db2-oltp.yaml
    kubectl -n DB2_INSTANCE_NAMESPACE apply -f ./db2-instance/templates/db2-wh.yaml

    Replace DB2_INSTANCE_NAMESPACE with your namespace.

What to do next

For more information, refer to the README.md in the ./db2-instance directory.