Accessing Google Cloud SQL from Google Compute Engine using private network

南笙酒味 提交于 2019-12-22 10:57:46

问题


is it possible to access Google Cloud SQL from Google Compute Engine using the private network?

It appears that Google Cloud SQL sees the public network IP for the Google Compute Engine instance.

And, the web console doesn't allow entering the instance private address.


回答1:


No it is not possible to access Google Cloud SQL instances via a private IP address.

This this page confirms this, it says Note: You must use the external (public) IP address of the GCE instance ...when configuring Authorized IP Addresses to your cloud sql instance from your GCE instance.




回答2:


This is now available via private services access and VPC Network Peering.

The announcement:

https://cloud.google.com/blog/products/databases/introducing-private-networking-connection-for-cloud-sql

Details:

https://cloud.google.com/sql/docs/postgres/private-ip




回答3:


You can't access cloud sql from a private IP address but you can whitelist NAT instance's Public IP in order to access cloudsql from private server.



来源:https://stackoverflow.com/questions/22891702/accessing-google-cloud-sql-from-google-compute-engine-using-private-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!