Tuesday, July 23, 2019

Re: [google-cloud-sql-discuss] VPC Network Setup for Private IP access from GKE to Cloud SQL

Hi Aniket,

I did something similar last week and it's quite easy.

1. Create the VPC network for the Kubernetes deployment, including IP ranges and stuff
2. Create the Cloud SQL instance on VPC network defined in step 1 and activate Private IP access. Let Google create the interconnection between the database network (which you can't control) and the VPC defined in step 1.
3. Voilá! You can now access your database through the private IP.

Manual VPC peering setups are trickier but I you'll probably not going to need one.

Cheers,
Pedro

Aniket Bhadane <abhadane@avaya.com> escreveu no dia terça, 23/07/2019 à(s) 09:25:
Our Spring 4 Application runs on Google Kubernetes Engine (GKE). I was going through articles for accessing Cloud SQL DB using Private IP. But I'm struggling in setting up the VPC requirements for this. From my understanding, we would need one VPC network where the Cloud SQL instance would exist. And we would need another VPC network in which our kubernetes deployment in running. And then we would have to peer the two networks. How does google facilitate creation of VPC network for Kubernetes deployment, how do you peer the two VPC networks in google cloud, what is the scope of network assignment (project, cluster, etc.), what are the conditions of IP ranges, etc. Is there any guide for setting up VPC networks for connecting GKE application to Cloud SQL?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/68d19e67-8e06-475c-9763-8206f25ef441%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CA%2BkCevvu%3DU%3DpFjarUqqtNU58WfoEbUPOtkY1G0Rz1V7P9%3DHY0g%40mail.gmail.com.

No comments:

Post a Comment