![]() ![]() ![]() There are various ways to connect to a database. You need to connect to the database to build or run the SQL code, generate reports, and diagnose application problem related to the database. WARNING: psql major version 10, server major version 12.When you’re working as an application developer or database administrator, you often need to deal with SQL statements to explore your database for various reasons. PGPASSWORD=dbuser psql -h localhost -p 5432 -U dbuser postgres PGPASSWORD=postgres psql -h localhost -p 5432 -U postgres postgresīut still if I will give user as "dbuser", than I am able to login Kubectl -n pgo port-forward svc/dbcluster 5432:5432 Pgo show user -show-system-accounts dbclusterĬLUSTER USERNAME PASSWORD EXPIRES STATUS ERROR Still I am not able to connect with the way you have shared, below are the details: Kindly share your views and suggest any way by which I can login using postgres as super user and create multiple databases Kubectl run pgsql-postgresql-client2 -rm -tty -i -restart='Never' -namespace default -image docker.io/bitnami/postgresql:11.7.0-debian-10-r9 -env="PGPASSWORD=postgres" -command - psql -host 172.20.130.186 -U postgres -p 5432īut at the same time if I will try to login using username as "dbuser" and password as "dbuser"(which i gave while creating cluster) which I had provided in portgres-operator.yaml, I am able to login Replica (dbcluster-ytye-5bbb44c945-2p7sz): UP Pgo create cluster dbcluster -replica-count=1 -password-superuser=postgres -password-replication=postgres -password=dbuserĪfter that I tried to login as super user using the clusterIp of the primary instance, something like this I had already setted the superuser(postgres) password while creating the cluster as you have mentioned also Mounted By: wso2dbcluster-ytye-5bbb44c945-2p7sz Mounted By: wso2dbcluster-backrest-shared-repo-868d58474f-bph2p Mounted By: wso2dbcluster-64cf64d6dd-5gkvk Pv.kubernetes.io/bound-by-controller: yesįinalizers: unreachable:NoExecute op=Exists for 300sĪnnotations: pv.kubernetes.io/bind-completed: yes Tolerations: /not-ready:NoExecute op=Exists for 300s SecretName: postgres-operator-token-s8zf9 Type: Secret (a volume populated by a Secret) Image: /crunchydata/pgo-event:centos7-4.4.1 Image: /crunchydata/pgo-scheduler:centos7-4.4.1 ![]() ![]() Readiness: exec delay=4s timeout=1s period=5s #success=1 #failure=3 Image: /crunchydata/postgres-operator:centos7-4.4.1 PGO_OPERATOR_NAMESPACE: pgo (v1:metadata.namespace) Readiness: http-get delay=15s timeout=1s period=5s #success=1 #failure=3 Liveness: http-get delay=15s timeout=1s period=5s #success=1 #failure=3 Image: /crunchydata/pgo-apiserver:centos7-4.4.1 Kubectl describe pod postgres-operator-58f448cd8c-krlw8 -n pgo If possible please run the following on the kubernetes or OpenShift (oc) commands and provide the result: Platform (Docker, Kubernetes, OpenShift): Amazon EKS.Where is this running ( Local, Cloud Provider) - Amazon EKS cluster.Please suggest how to create the multiple database in the same postgres instance and how to create the schemas using. If I will login into postgres pod than only I was able to create any new database: Psql: FATAL: password authentication failed for user "postgres" I tried to run a client also with super user credentials but not able to login and gave error like. but I want to create multiple database in the same postgres instance which I am not able to do. Postgres-operator.yml file will create one database. I had installed the latest 4.4.1 version of crunchy data operator for achieving Postgres HA in kubernetes ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |