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.
About this task
To perform this task, you must have root authority on the host operating system.
Procedure
-
Ensure that the Db2 Warehouse database is stopped and not in use.
-
Access the master node of the Kubernetes cluster.
-
Log in to the Kubernetes master node user as an administrator.
-
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
-
Edit db2warehouse-smp-helm/values.yaml:
-
Set the value of the existingClaimName parameter to the name of the
Persistent Volume Claim (PVC) (db2warehouse-smp-pvc)
-
Replace the password specified by BLUADMIN.PASSWORD with a new
password for the bluadmin user.
-
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"
-
Issue the following command to deploy Helm Chart:
helm install --name db2wh-smp-deploy db2warehouse-smp-helm
-
Issue the following commands to check whether the deployment is progressing successfully:
- To retrieve the full pod
name:
kubectl get pod | grep db2warehouse-smp
- To check the pod status and confirm that it is creating the
container:
kubectl describe pod full-pod-name
- 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
-
After the deployment has concluded successfully, access the console:
- Open /etc/hosts and identify the IP address of the proxy node.
- 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.
- Using the IP address and port number from the previous steps, open the following URL in a
browser:
https://IP_addresss:port_number
- Log in with the user ID bluadmin and the password that was set in Step 5
-
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.