Skip to content

Database Access

Barrett Falk edited this page Jan 19, 2024 · 1 revision

To connect to the database from your workstation:

  1. Ensure you have oc on your path (can be downloaded here https://console.apps.emerald.devops.gov.bc.ca/command-line-tools)
  2. Using the link above, click the "Copy login command" link to get the login token
  3. In a terminal window, paste the login command
  4. Select the project that namespace (e.g. oc project dc0a4a-dev)
  5. Find the database pod by running the command oc get pods
  6. Port forward to the database pod `oc port-forward {podname} 5433:5432

Connect to the database using as you normally would on your workstation, using the host localhost and the port 5433. Password is located in the secret here: https://console.apps.emerald.devops.gov.bc.ca/k8s/ns/dc0a4a-dev/secrets/dc0a4a-compenf-dev. Specifically the databasePassword secret. Note that quotes are part of the password.

Clone this wiki locally