Hi Ahmet

On Thursday, 22 June 2017 02:25:05 UTC+4, Ahmet Alp Balkan wrote:
>
> Can you run "kubectl logs -l app=wordpress"? I am assuming there will be 
> some logs from the crashing mysql container.
>
>
Thanks for your response. I get no output from running that command (I 
suppose no logs are being generated). I tried both the command, and running 
it in a loop, just in case:

 for i in `seq 1 100`;do echo "checking $i " - $(kubectl logs -l app=web 
);done

No result.

Just to be clear, wordpress container is in a pod, and the cloud sql 
container is a sidecar container connected to pod.

Google's documentation seems pretty thin on getting this working properly 
with GKE containers, and non-existent on troubleshooting connectivity 
issues with cloud sql proxy.

Do you know of an alternative method of getting a container access to Cloud 
SQL from GKE ?



On Wed, Jun 21, 2017 at 7:58 AM, Traiano Welcome <tra...@gmail.com 
> <javascript:>> 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
>>
>>
>> <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):
>>
>>
>>  https://pastebin.com/DjYM97R7 <https://pastebin.com/DjYM97R7>
>>
>>
>> <https://pastebin.com/DjYM97R7>
>>
>> And a description of the pod (kubectl describe ):
>>
>>
>> <https://pastebin.com/pN7gUZg8>
>>
>>  https://pastebin.com/pN7gUZg8 <https://pastebin.com/pN7gUZg8>
>>
>>
>>
>> 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
>>
>> <https://stackoverflow.com/questions/44672411/simple-client-connecting-to-google-cloud-sql-using-cloud-sql-proxy#comment76333823_44672411>
>>      
>> 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 
>> <https://stackoverflow.com/users/6052496/traiano-welcome> 3 hours ago 
>> <https://stackoverflow.com/questions/44672411/simple-client-connecting-to-google-cloud-sql-using-cloud-sql-proxy#comment76334135_44672411>
>>   
>>
>>
>> -- 
>> 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 <javascript:>.
>> To post to this group, send email to kubernet...@googlegroups.com 
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/kubernetes-users.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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+unsubscr...@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.
  • [kubernetes-... Traiano Welcome
    • Re: [ku... 'Ahmet Alp Balkan' via Kubernetes user discussion and Q&A
      • Re:... Traiano Welcome
        • ... Evan Jones
          • ... Traiano Welcome
            • ... Evan Jones
              • ... Traiano Welcome
                • ... Evan Jones

Reply via email to