I have deployed my crunchy db postgresq on my Kubernetes cluster.
However, I am not sure how to connect to the database remotely.
What command can I use to connect remotely so I can create a new database?
Is there a kubectl command to go with psql?
To connect to the cluster with the pgAdmin clientOpen the context (right-click) menu for Servers, and then choose Create, Server. Enter information in the Create - Server dialog box. On the Connection tab, add the Aurora PostgreSQL cluster address for Host and the PostgreSQL port number (by default, 5432) for Port.
Create and Apply PostgreSQL Deployment Deployments are a way to manage rolling out and updating applications in a Kubernetes cluster. They provide a declarative way to define how an application should be deployed and updated, and can be used to roll back to previous versions if needed.
I was able to look at another forum and found what I needed. I executed with the pod name and gets me to a bash prompt.
kubectl exec -it <POD_NAME> bash
kubctl get pods
kubectl exec -it <POD_NAME> bash
su postgres
psql
in the above postgres is user name. you will get:
postgres=#
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With