Search code examples
google-cloud-platformgoogle-cloud-sqlcloud-sql-proxy

GCP: Connection to Cloud SQL


I have an architectural issue with Cloud SQL. We have an API that is running in a GKE cluster in a network A and a cloud SQL instance in a network B. The current network config doesn't allow peering between these 2 networks. Is there any possibility to connect the API to the instance.

Draft of the current architecture


Solution

  • As @ Ferregina suggested:

    The bastion hosts provide secure access to Linux instances located in the private and public subnets of your virtual private cloud (VPC). The solution sets up a Multi-AZ environment and deploys Linux bastion host instances into the public subnets.

    As mentioned in the document:

    To connect to a Cloud SQL instance using private IP, the Cloud SQL Auth proxy must be on a resource with access to the same VPC network as the instance.

    Refer to this link for more information.