9

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?

2 Answers 2

13

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
Sign up to request clarification or add additional context in comments.

Comments

3
kubctl get pods
kubectl exec -it  <POD_NAME> bash
su postgres
psql

in the above postgres is user name. you will get:

postgres=#

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.