Exec into the Db2 pod

You must be able to run the exec command on the Db2® pod to perform common administration tasks.

Before you begin

In the following procedure, the placeholder <namespace> is used represent the namespace used for the respective database deployments.

Procedure

  1. Find the name of your Db2 pod for your database deployment:
    db2_podname=$(oc -n <namespace> get po --selector name=dashmpp-head-0)

    or

    db2_podname=$(kubectl -n <namespace> get po --selector name=dashmpp-head-0)
  2. Run the exec command to exec into the Db2 pod:
    oc -n namespace exec -it ${db2_podname} -- bash
    or
    kubectl -n namespace exec -it ${db2_podname} -- bash