0
0
GCPcloud~20 mins

VPC peering in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
GCP VPC Peering Setup
📖 Scenario: You are working as a cloud engineer for a company that has two separate Virtual Private Cloud (VPC) networks in Google Cloud Platform (GCP). These networks need to communicate securely and privately without using the public internet.To achieve this, you will set up VPC peering between the two networks.
🎯 Goal: Create a VPC peering connection between two existing VPC networks named vpc-network-a and vpc-network-b in the same GCP project.This will allow resources in both networks to communicate privately.
📋 What You'll Learn
Create a VPC peering request from vpc-network-a to vpc-network-b.
Create a VPC peering request from vpc-network-b to vpc-network-a.
Use the Google Cloud SDK gcloud commands to configure the peering.
Verify the peering connections are established.
💡 Why This Matters
🌍 Real World
VPC peering is used in cloud environments to connect separate private networks securely without exposing traffic to the public internet.
💼 Career
Cloud engineers and network administrators often configure VPC peering to enable private communication between different parts of an organization's cloud infrastructure.
Progress0 / 4 steps
1
Create VPC peering request from vpc-network-a
Use the gcloud command to create a VPC peering connection from vpc-network-a to vpc-network-b with the peering name peer-a-to-b.
GCP
Need a hint?

Use the gcloud compute networks peerings create command with the correct network names and peering name.

2
Create VPC peering request from vpc-network-b
Use the gcloud command to create a VPC peering connection from vpc-network-b to vpc-network-a with the peering name peer-b-to-a.
GCP
Need a hint?

Repeat the peering creation from the other network with a different peering name.

3
Verify VPC peering connections
Use the gcloud command to list the VPC peering connections for vpc-network-a and verify the peering peer-a-to-b is in the list.
GCP
Need a hint?

Use gcloud compute networks peerings list --network=vpc-network-a to see the peering connections.

4
Verify VPC peering connections from vpc-network-b
Use the gcloud command to list the VPC peering connections for vpc-network-b and verify the peering peer-b-to-a is in the list.
GCP
Need a hint?

Use gcloud compute networks peerings list --network=vpc-network-b to confirm the peering from the other side.