Redeploying IBM® Db2 Warehouse using Kubernetes

If you already set up Db2® Warehouse using Kubernetes but need to redeploy it, you must first take steps to preserve your data and configurations.

Before you begin

For information about how to gain access to the containers, see the "Product images" section of the prerequisites topic that applies to your platform.

About this task

To perform this task, you must have root authority on the host operating system.

Procedure

  1. Ensure that the Db2 Warehouse database is stopped and not in use.
  2. Access the master node of the Kubernetes cluster.
  3. Log in to the Kubernetes master node user as an administrator.
  4. Enter the following commands in the order shown to extract the necessary YAML files for Helm Chart deployment:
    docker run -dit --name=test --entrypoint=/bin/bash icr.io/obs/hdm/db2wh_ee:v11.5.7.0-cn5-db2whlinux
    docker cp test:/opt/ibm/scripts/kubernetes/smp/db2warehouse-smp-helm .
    docker stop test; docker rm test
  5. Edit db2warehouse-smp-helm/values.yaml:
    1. Set the value of the existingClaimName parameter to the name of the Persistent Volume Claim (PVC) (db2warehouse-smp-pvc)
    2. Replace the password specified by BLUADMIN.PASSWORD with a new password for the bluadmin user.
    3. If necessary, adjust the repo and tag name fields to correspond to the name of the image that you are deploying.
      For example, for an image with the name icr.io/obs/hdm/db2wh_ce:v3.0.1-db2wh_devc-linux, specify the following fields:
      repo: "icr.io/obs/hdm/db2wh_ce"
      tag name: "v3.0.1-db2wh_devc-linux"
  6. Issue the following command to deploy Helm Chart:
    
    helm install --name db2wh-smp-deploy db2warehouse-smp-helm
  7. Issue the following commands to check whether the deployment is progressing successfully:
    1. To retrieve the full pod name:
      kubectl get pod | grep db2warehouse-smp
    2. To check the pod status and confirm that it is creating the container:
      kubectl describe pod full-pod-name
    3. After the container is created, issue the following command to monitor its log until the log indicates that the deployment has concluded successfully:
      kubectl logs -f full-pod-name
  8. After the deployment has concluded successfully, access the console:
    1. Open /etc/hosts and identify the IP address of the proxy node.
    2. Enter the following command to identify the port number:
      kubectl get service | grep db2warehouse
      In the output, the number that follows the string 8443: is the port number.
    3. Using the IP address and port number from the previous steps, open the following URL in a browser:
      https://IP_addresss:port_number
    4. Log in with the user ID bluadmin and the password that was set in Step 5
  9. On the head node host, log in to the web console by using the web console URL that was provided after the successful completion messages. The URL is https://head_node_IPaddress:8443.