Questions tagged [cloud-sql-proxy]
243 questions
5
votes
1 answer
Google Cloud Sql Proxy error while executing the file
This is the command I run in my shell: ./cloud_sql_proxy -instaces=[my_project_id:europe-west3:my_project_name]=tcp=5432.
Sometimes i got the following errors messages:
CASE 1: flag provided but not defined: -instaces;
CASE 2: 2021/11/19 17:50:12…

Enrico
- 361
- 1
- 11
5
votes
1 answer
How to configure cloud SQL with GKE using cloud sql proxy?
I am trying to set up a connection between Google Cloud Postgres and Google Kubernetes Engine using a CloudSQL proxy. If I check out the logs of both workloads:
I am getting:
2021-02-02T11:42:09.748706102Z2021/02/02 11:42:09 dial tcp 127.0.0.1:5432:…

Amit Pal
- 10,604
- 26
- 80
- 160
5
votes
1 answer
When using a Google Cloud SQL database, is there a difference between a private IP + SSL, or the cloud proxy sidecar?
When trying to evaluate how to connect to a Cloud SQL database from a Google Kubernetes Engine pod, there are a couple of ways to do this. One is to use a sidecar cloud proxy agent. Another is using a private IP and using a SSL connection between…

Erik L
- 1,104
- 15
- 31
5
votes
1 answer
Control order of container termination in a single pod in Kubernetes
I have two containers inside one pod. One is my application container and the second is a CloudSQL proxy container. Basically my application container is dependent on this CloudSQL container.
The problem is that when a pod is terminated, the…

Jahongir Rahmonov
- 13,083
- 10
- 47
- 91
4
votes
0 answers
Pool Cloud SQL PostgreSQL connections using PgBouncer
We are new to Google Cloud SQL and have been trying to integrate pgbouncer with Google Cloud SQl Postgres and authenticate database users with SECURITY DEFINER function (which queries pg_shadow)
Our Configuration:
Server -> Pgbouncer + Cloud sql…

Devesh Poojari
- 53
- 1
- 8
4
votes
3 answers
Connect Google Cloud Build to Google Cloud SQL
Google Cloud Run allows for using Cloud SQL. But what if you need Cloud SQL when building your container in Google Cloud Build? Is that possible?
Background
I have a Next.js project, that runs in a Container on Google Cloud Run. Pushing my code to…

Rogier
- 480
- 3
- 13
4
votes
5 answers
Failed to retrieve token from the Google Compute Engine metadata service. Status: 404
I'm trying to set up Cloud SQL Proxy running as a sidecar in my GKE cluster. The configuration is done via Terraform. I've set up workload identity, required service accounts, and so on. When launching ./cloud_sql_proxy from within the GKE cluster…

Alexander Matsko
- 51
- 1
- 1
- 4
4
votes
3 answers
Run DB migrations on cloud build connecting to cloud sql using private IP
I am trying to setup db migrations for a Nodejs app on cloud build connecting to cloud sql with a private IP via cloud sql proxy.
Cloud SQL connection always fail from cloud build.
Currently I am running migration manually from a compute engine.
I…

Abhilash Chelankara
- 408
- 3
- 10
4
votes
2 answers
cannot fetch token error when using cloudsql-proxy with GKE
I am using GKE with istio add-on enabled. Myapp somehow gives 503 errors using when using websocket. I am starting to think that maybe the websocket is working but the database connection is not and that causes 503's, as the cloudsql-proxy logs give…

musicformellons
- 12,283
- 4
- 51
- 86
4
votes
2 answers
Connecting to Google Cloud SQL (PostgreSQL) locally and through App Engine Flex
Locally:
My local environment is Mac OS. I'm attempting to connect to my Cloud SQL (PostgreSQL) db using Java 8. I've whitelisted my IP and I am able to connect to the DB using pgadmin. My service account is also project owner for the project that…

Adz
- 2,809
- 10
- 43
- 61
4
votes
1 answer
Unable to connect to MySQL via Cloud SQL Proxy
I have created a second generation MySQL SQL instance. I have created a VM on Compute Cloud. I followed the instructions and started the SQL proxy via:
./cloud_sql_proxy -instances=redmine=tcp:3306…

Sudheer
- 710
- 6
- 25
3
votes
0 answers
Error 503 while connecting to cloud Postgres (hosted on GCP) using gcloud/google sql proxy
I have cloud postgres setup on GCP with public IP enabled. Previously, I have been able to connect via google sql proxy but now I am getting following error:
errors parsing config:
googleapi: Error 503: Policy checks are unavailable.,…

tallal
- 31
- 1
3
votes
1 answer
Is there a way to impersonate a service account with the cloudsql_proxy executable?
https://github.com/GoogleCloudPlatform/cloudsql-proxy
I have found this is possible by setting impersonation system wide with this command: gcloud config set auth/impersonate_service_account .
The proxy exe seems to read the…

red888
- 27,709
- 55
- 204
- 392
3
votes
0 answers
CREATE EXTENSION using cloud_sql_proxy fails due to insufficient privileges
My goal is to enable the ltree postgres extension in an automated way (GCP PostgreSQL extensions).
This is the query needed to create the extension
CREATE EXTENSION IF NOT EXISTS ltree;. I verified that this command works when I manually connect to…

Pinna_be
- 4,517
- 2
- 18
- 34
3
votes
2 answers
How to connect Data Fusion to Cloud SQL Proxy
I'm on a journey trying to connect Data Fusion with Cloud SQL MySQL with private IP. I've read many ressources and it seems that it is possible (at least I'm still not convinced that it is not possible). What I have so far:
a Data Fusion private…

Simon Breton
- 2,638
- 7
- 50
- 105