PostgreSQL can be accessed via port 5432 on the following DNS name from within your cluster:
{{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local

To get your user password run:

    PGPASSWORD=$(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.postgres-password[*]}"`);echo)

To connect to your database run the following command (using the env variable from above):

   kubectl run {{ template "fullname" . }}-client --rm --tty -i --image postgres \
   --env "PGPASSWORD=$PGPASSWORD" \
   --command -- psql -U {{ default "postgres" .Values.postgresUser }} \
   -h {{ template "fullname" . }} {{ default "postgres" .Values.postgresDatabase }}

