I followed the instructions in this article to deploy a helm chart for postgresql.
https://artifacthub.io/packages/helm/cetic/postgresql
After I use helm install to deploy it, I want to get the password through
export POSTGRES_PASSWORD=$(kubectl get secret --namespace postgres my-release-postgresql -o jsonpath="{.data.postgresql-password}" | base64 --decode)
However, this command results in Error from server (NotFound): secrets "my-release-postgresql" not found
Then I tried getting the secret, which shows the following information:
NAME TYPE DATA AGE
sh.helm.release.v1.my-release.v1 helm.sh/release.v1 1 24s
The age shows it’s the newly created secret that we want, but the name is not my-release-postgresql
. I switched to the name shown above to get the password but it results in an empty string.
Any idea on where the issue might be?