I'm following this example of how to get wordpress running on GKE connected to Google Cloud SQL via the Google Cloud SQL Proxy:
https://cloud.google.com/sql/docs/mysql/connect-container-engine
Unfortunately, my wordpress pod is failing with a crashloop error, and it's 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:
Here is a description of the deployment (kubectl describe wordpress):
And a description of the pod (kubectl describe ):
|
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
– Traiano Welcome
3 hours ago
|
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
Can you run "kubectl logs -l app=wordpress"? I am assuming there will be some logs from the crashing mysql container.
On Wed, Jun 21, 2017 at 7:58 AM, Traiano Welcome <tra...@gmail.com> wrote:
I'm following this example of how to get wordpress running on GKE connected to Google Cloud SQL via the Google Cloud SQL Proxy:
https://cloud.google.com/sql/docs/mysql/connect-container-engine
Unfortunately, my wordpress pod is failing with a crashloop error, and it's 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?
Here is a description of the deployment (kubectl describe wordpress):
And a description of the pod (kubectl describe ):
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
– Traiano Welcome 3 hours ago
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@googlegroups.com.
I know nothing about wordpress, but for what it is worth, we are using this Cloud SQL Proxy container with success. A few notes about the config you posted:* I'm assuming that where you have "-instances=[INSTANCE_CONNECTION_NAME]=tcp:[PORT]" you've replaced this with your Cloud SQL instance name (project:region:cloud_sql_name), and port with 3306, right?
--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/2kqHNT1Nbtc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Hi Evan
To unsubscribe from this group and all its topics, send an email to kubernetes-use...@googlegroups.com.
The Cloud SQL Proxy logs suggest to me that it may not be using the right credentials? It is possible that it is trying to use the cluster's "default service account"?
To unsubscribe from this group and all its topics, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.