Skip to content

postgresql db user and password config does't work #16

@gongpengjun

Description

@gongpengjun

postgresqlPassword: B1gB1tBu5 does NOT work as expected.

gongpengjun@mbp kubernetes-automation-toolkit$ vagrant ssh
Last login: Wed Feb 23 14:12:58 2022 from 10.0.2.2
vagrant@ubuntu2004:~$ kubectl get secret --namespace pg pgdb-postgresql -o jsonpath="{.data.postgres-password}" | base64 --decode;echo
P2zJdANSBT

vagrant@ubuntu2004:~$ microk8s kubectl get pods -n pg
NAME                READY   STATUS    RESTARTS   AGE
pgdb-postgresql-0   1/1     Running   0          12h
vagrant@ubuntu2004:~$ microk8s kubectl exec -it pgdb-postgresql-0 -n pg -- bash
I have no name!@pgdb-postgresql-0:/$ env|grep POSTGRES_
POSTGRES_PASSWORD=P2zJdANSBT
I have no name!@pgdb-postgresql-0:/opt/bitnami/postgresql/bin$ psql -U "postgres" -h 127.0.0.1 -p 5432
Password for user postgres: P2zJdANSBT
psql (11.9)
Type "help" for help.

postgres=# \du
                                   List of roles
 Role name |                         Attributes                         | Member of
-----------+------------------------------------------------------------+-----------
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

vagrant_up.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions