I'm following this example of how to get wordpress running on GKE connected to Google Cloud SQL via the Google Cloud SQL Proxy.

But either the documentation, or the proxy itself, is deficient, or I am :-)

Unfortunately, my Wordpress pod is failing with a crashloop error, and it is not clear from the documentation, how to dig deeper into the reason for this. Here is a sample of the error:

bash-3.2$ kubectl get pods| egrep wordpress
wordpress-713960421-v4f49     0/2       CrashLoopBackOff   16         20m

(kubectl describe pod ...)

11m 22s 36 kubelet, gke-noon-staging-default- pool-d500b601-dfb6 Warning FailedSync Error syncing pod, skipping: [failed to "StartContainer" for "web" with CrashLoopBackOff: "Back-off 5m0s restarting failed container=web
pod=wordpress-713960421-v4f49_default(f64276d2-5660-11e7-a565-42010a9a0023)" , failed to "StartContainer" for "cloudsql-proxy" with
CrashLoopBackOff: "Back-off 5m0s restarting failed container=cloudsql-proxy
pod=wordpress-713960421-v4f49_default(f64276d2-5660-11e7- a565-42010a9a0023)" ]

My questions are:

  • How to dig further into why the pod is failing to deploy with cloud sql proxy
  • Has anyone got an example working for using cloud sql proxy with as simple mysql client pod?

A description of the pod (kubectl describe):


I deployed the cloud sql proxy and wordpress container separately, and found the cloud sql proxy runs fine, but the wordpress blog container fails to startup on kubernetes.

Error syncing pod, skipping:

failed to "StartContainer" for "wordpress" with CrashLoopBackOff

Looking at the pod logs for wordpress, it seems wordpress is dying because it cannot connect to the MySQL DB:

MySQL Connection Error: (2002) Connection refused –

  • Looking at your file the instance connection name is not defined. i.e. '-instances=[INSTANCE_CONNECTION_NAME]=tcp:[PORT]' Did you posted like that to avoid exposing sensitive information? or is it actually not defined? – Carlos Jun 22 '17 at 17:27
  • @traianowelcome Were you able to set up the Wordpress with Google Cloud SQL proxy? If so, please post a self-answer so to benefit the community having similar issue. – N Singh Sep 20 '17 at 19:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.