AdSense

網頁

2023/4/20

GCP VPC network private service connection簡介

GCP VPC的private service connection用來讓Google或三方服務(稱為service producers)透過內部IP位址與VPC內的資源如VM instance溝通,而不用透過外部IP來存取。


要建立VPC private service connection必須先分配一組VPC的網段(Allocated IP range)供service producers的VPC網路使用,此網段不可與現有的subnet網段、custom static route及allocated range重疊。

例如下圖左側[Custom VPC network]為自訂的VPC網路;右側[Service producer VPC netowrk]為service producer(e.g. DB1 Cloud SQL)的VPC網路。


[Custom VPC network]分配了一組專供其private service connection使用的網段[Allocated range(10.240.0.0/16)]。

[Service producer VPC]的[DB1(10.240.0.2)]及[Resource(10.240.10.2)]透過[Custom VPC network]的private service connection與[Custom VPC network]內的[VM1(10.1.0.2)]以內部IP溝通。

更簡單的說,private service connection就是VPC分派一組網段作為service producer的VPC subnet的網段,所以彼此可透過內部IP互通。


沒有留言:

AdSense