how to connect to postgresql on Kubernetes cluster?

3/14/2017

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?

-- Sonam
kubernetes
postgresql

1 Answer

3/14/2017

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
-- Sonam
Source: StackOverflow