VPC network peering between two networks
VPC is GCP's network encapsulation with its own address space and set of resources. For instances from one VPC to communicate with an instance in another VPC, they can route traffic via the open internet. However, to communicate between privately two VPCs, GCP offers a service called VPC peering. We can create a peering connection without any project or organizational restrictions. VPC peering reduces network latency, improves security and network costs by communicating via internal IPs.
Note
For more information refer to: https://cloud.google.com/vpc/docs/vpc-peering.
Getting ready
The following are the initial setup verification steps and network creation to be carried out before the recipe can be executed:
- Create or select a GCP project.
- Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and a few others are enabled automatically).
- We'll create a VPC network calledÂ
alpha
. The following command assumes that you...