Wednesday, May 3, 2017

[google-cloud-sql-discuss] Re: Cannot have multiple cloudsql-docker proxy connections

Answering my own question: this appears to be specific to version 1.09 of cloudsql-proxy.  Downgrading to 1.08 resolved it (along with moving the proxy into its own deployment with service so it can be shared and scaled independently).  Issue submitted here: https://github.com/GoogleCloudPlatform/cloudsql-proxy/issues/89.

On Wednesday, May 3, 2017 at 10:50:10 AM UTC-5, Sean Dowd wrote:
I have a simple example where I need multiple containers (deployments with replicas and jobs with replicas set to 1) to be able to connect to my mysql instance.  I'm following the directions from this page: https://cloud.google.com/sql/docs/mysql/connect-container-engine

I'm able to combine the app (wordpress) and job (logstash connected to mysql over jdbc) into a single deployment with the cloudsql-proxy sidecar and it works if I have replicas set to 1.  If I increase replicas to 2 or more, only one of the sidecars will start (call it pod 1).  The other errors off as follows:

Error from server (BadRequest): container "cloudsql-proxy" in pod "mysql-test-2203380987-cmkkf" is waiting to start: trying and failing to pull image

The sidecar in pod 1 works with no issues as do the other containers in pod 1, but the containers in pod 2 fail.

I also tried pulling the job out of the deployment, but I get the same errors.  Then I simplified and have only a simple mysql connection (via mysql command line) with the sidecar in a deployment.  If replicas is 1, it works fine.  If replicas is 2, one of the testers and sidecars works, the other fails with the image pull issue above.

Why can't I have more than 1 proxy running to mysql?  If I need multiple users defined, how would that work with replicated deployments?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/b98316cf-e7b3-4318-bc5d-27a4fc91a2db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment