generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
Database Access
Barrett Falk edited this page Jan 19, 2024
·
1 revision
To connect to the database from your workstation:
- Ensure you have oc on your path (can be downloaded here https://console.apps.emerald.devops.gov.bc.ca/command-line-tools)
- Using the link above, click the "Copy login command" link to get the login token
- In a terminal window, paste the login command
- Select the project that namespace (e.g. oc project dc0a4a-dev)
- Find the database pod by running the command oc get pods
- 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.