Trying to create SQL instance in Google Cloud - Kubernetes

5/7/2018

I am trying to follow instructions for deploying Django Application with PostgreSQL on Google Cloud on the following link: https://cloud.google.com/python/django/kubernetes-engine. But I am running in some sort of error when i try to start SQL proxy using connectionName.

Here is the command I am running:

./cloud_sql_proxy -instances="poised-diagram-202622:us-east1:agent-technologies-db"=tcp:5432

And here is the error i get after i run it:

enter image description here

Any thoughts whats going on? And is it important that I accidentally messed up the time zone, why is setting up correct time zone important?

* UPDATE *

When i do not use quotes I am getting the following:

enter image description here

-- Stefan Radonjic
google-cloud-platform
google-kubernetes-engine
kubernetes
postgresql

1 Answer

5/7/2018

According to syntax in documentation, you don`t need the quotes.

Just run the command without quotes:

./cloud_sql_proxy -instances=poised-diagram-202622:us-east1:agent-technologies-db=tcp:5432

Update:

Ok, let's start from the beginning. First, try to remove and download cloud_sql_proxy again:

wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 -O cloud_sql_proxy  && chmod +x cloud_sql_proxy

Then try to run proxy:

./cloud_sql_proxy -instances=$(gcloud sql instances describe $Your-Instance-ID | grep connectionName | awk '{print $2}')=tcp5432

Please don't forget to replace $Your-Instance-ID with your SQL Instance ID.

-- Nick Rak
Source: StackOverflow