Logging in to the bundled postgresql database:

ARTIFACTORY: How to log in to the database for postgresql pod for helm installation

AuthorFullName__c
Lawrence Fung
articleNumber
000005263
ft:sourceType
Salesforce
FirstPublishedDate
2022-05-04T09:22:43Z
lastModifiedDate
2022-05-04
VersionNumber
3

1. By default the postgresql password is saved as a kubernetes secret. To get the secret name you can run kubectl get secrets. To decode the password in the secret you can run the command below after providing the postgresql secret name.
kubectl get secret -n <namespace> <postgresql_secret_name> -o jsonpath="{.data.postgresql-password}" | base64 --decode
2. Once you obtain the password, you can now log into the database inside the postgresql pod. Below is the command to get a shell on the running postgresql pod.
kubectl exec -it artifactory-postgresql-0 bash

3. Run psql inside the postgresql pod to login to the database using the previously retrieved password. The default username is artifactory.
psql -U artifactory password=<postgresql_password>