Hello,
I'm encountering an issue while trying to connect my NiFi pod, deployed on a GKE (Google Kubernetes Engine) cluster, to a SQL database on GCP (Google Cloud Platform) using the Cloud SQL Proxy. I've taken the following steps:
However, I'm getting the following error in the logs of the Cloud SQL Proxy:
Here's a brief summary of my setup:
I've double-checked my configurations, and everything seems to be in order. However, I'm unable to establish a connection, and I'm receiving a "connection timed out" error.
i tried the connection with the public ip of the sql database without passing through the proxy and the connection established without problem.
Could you please assist me in resolving this issue? If you require more information or specific configurations, please let me know, and I'll provide them while keeping sensitive information hidden.
Thank you for your help.
Sincerely,
Hi @salah-11,
Welcome to Google Cloud Community!
The Cloud SQL Auth Proxy is added to your pod using the sidecar container pattern when you connect utilising the Cloud SQL Auth Proxy. Your application can connect to the Cloud SQL Auth Proxy via localhost, enhancing security and performance, because the Cloud SQL Auth Proxy container is in the same pod as your application.
Visit About the Cloud SQL Auth Proxy for additional details about the Cloud SQL Auth Proxy. The Kubernetes documentation's Pod Overview provides more details on working with pods.
For connecting using the Cloud SQL Auth Proxy you need the following:
You may also follow this documentation:
Hope this helps!