Cloud SQL postgresql by Private IP not working

153 vues
Accéder directement au premier message non lu

Wendel de Witte

non lue,
11 janv. 2019, 22:16:0611/01/2019
à Google Cloud SQL discuss
Hi,

I'm trying to setup a connection by private IP https://cloud.google.com/sql/docs/postgres/private-ip

Steps:
  1. Enabled Network Service API
  2. Created a new Postgresql Instance with Private IP: default network.
  3. This gives me a Public and Private IP address
  4. Whitelist Cloud Shell IP
  5. Start Cloud Shell and execute with Public Ip succeeds psql -U postgres -h
  6. Start Cloud Shell and execute with Private Ip times out psql -U postgres -h
Am I missing something?

George (Cloud Platform Support)

non lue,
14 janv. 2019, 17:37:2714/01/2019
à Google Cloud SQL discuss
Hello Wendel, 

Before configuring a Cloud SQL instance to use private IP, you must have a VPC network at least one subnet in the same region as your Cloud SQL instances in place. From your 6 points list, it is not apparent how you configured this VPC network. You may refer to the "Configuring Private IP Connectivity" documentation page for related detail. The page you refer to also states that private services access is implemented as a VPC peering connection between your VPC network and the Google services VPC network where your Cloud SQL instance resides.

Wendel de Witte

non lue,
15 janv. 2019, 08:52:3715/01/2019
à google-cloud...@googlegroups.com
Hello

Thanks for the reply. I got it working fine on a Compute Engine using the default VPC. Kubernetes Engine required a custom VPC with a subnet, which is now also working as expected.

On Mon, Jan 14, 2019 at 11:37 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:
Hello Wendel, 

Before configuring a Cloud SQL instance to use private IP, you must have a VPC network at least one subnet in the same region as your Cloud SQL instances in place. From your 6 points list, it is not apparent how you configured this VPC network. You may refer to the "Configuring Private IP Connectivity" documentation page for related detail. The page you refer to also states that private services access is implemented as a VPC peering connection between your VPC network and the Google services VPC network where your Cloud SQL instance resides.

--
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-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/e93becb3-6c65-4dd6-b1ff-383d0b78e692%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
With kind regards, Met vriendelijke groeten,

Wendel de Witte

Xinox Software | Google Cloud Architect | www.xinox-apps.com
Email: wendel....@xinox-apps.com | Mob.: +31 6 15595297

George (Cloud Platform Support)

non lue,
17 janv. 2019, 10:36:5017/01/2019
à Google Cloud SQL discuss
Hi Wendel, 

Glad to read you have succeeded in setting up a connection by private IP. For the benefit of people trying to accomplish the same task, sharing more details here would prove of great help. 
Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message