Add a BYOC VPC Peering Connection on GCP
To start sending data to the Redpanda cluster, you must configure the VPC network connection by connecting your Redpanda VPC to your existing GCP VPC.
Prerequisites
-
A GCP account
-
A running BYOC cluster in GCP. See Create a BYOC Cluster on GCP.
-
Your Redpanda cluster and VPC must be in the same region.
Create VPCs
-
Go to the VPC section in your GCP project UI.
-
You should see an existing VPC. This has an ID with a
redpanda-
prefix. -
If you don’t already have a second VPC to connect your Redpanda network to, create one.
-
This is your Redpanda client. Ensure that its CIDR does not overlap with the Redpanda network from step 1.
-
The following example uses the name
rp-client
.
-
Create a new peering connection
-
In the GCP project UI, go to Peering Connections.
-
Create a new peering connection with the following values:
-
Your VPC network:
rp-client
-
Peered VPC network:
redpanda-<id>
-
-
Save changes.
-
Create another peering connection, with the reverse values as above:
-
Your VPC network:
redpanda-<id>
-
Peered VPC network:
rp-client
-
-
Save changes. GCP should set up routing automatically.
Connect to Redpanda
The cluster Overview page has a variety of ways for you to connect and start sending data.
To quickly test this quickly in GCP:
-
Create a virtual machine on your GCP network that has a firewall rule allowing ingress traffic from your IP (for example,
<your-ip>/32
) -
Activate the Cloud Shell in your project, install
rpk
in the Cloud Shell, and runrpk cluster info
. -
If there is output from Redpanda, your connection is successful.