Skip to content

Commit 3f40845

Browse files
micheleRPFeediver1
andauthored
update private networking (#496)
* update private networking * add for UI * Update modules/networking/pages/serverless/aws/privatelink-ui.adoc Co-authored-by: Joyce Fee <[email protected]> * Update modules/networking/pages/serverless/aws/privatelink-ui.adoc Co-authored-by: Joyce Fee <[email protected]> * doc review feedback --------- Co-authored-by: Joyce Fee <[email protected]>
1 parent f4b10a8 commit 3f40845

File tree

2 files changed

+148
-2
lines changed

2 files changed

+148
-2
lines changed

modules/networking/pages/serverless/aws/privatelink-api.adoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,26 @@ SECURITY_GROUP_ID=<security_group_id>
280280

281281
=== Add security group rules
282282

283-
The following example adds security group rules to allow access to Redpanda services.
283+
The following example shows how to add security group rules to allow access to Redpanda services.
284284

285285
[,bash]
286286
----
287287
# Allow Kafka API bootstrap (seed)
288288
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
289289
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9092 --cidr 0.0.0.0/0
290290
291+
# Allow Kafka API bootstrap (broker)
292+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
293+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9093 --cidr 0.0.0.0/0
294+
295+
# Allow Kafka API bootstrap (broker)
296+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
297+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9094 --cidr 0.0.0.0/0
298+
299+
# Allow Kafka API bootstrap (broker)
300+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
301+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9095 --cidr 0.0.0.0/0
302+
291303
# Allow Schema Registry
292304
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
293305
--group-id $SECURITY_GROUP_ID --protocol tcp --port 8081 --cidr 0.0.0.0/0

modules/networking/pages/serverless/aws/privatelink-ui.adoc

Lines changed: 135 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,147 @@ Do not configure forwarding rules to target the VPC's Amazon-provided DNS resolv
4343

4444
== Enable endpoint service for existing clusters
4545

46-
If you do not already have a PrivateLink resource for your cluster's resource group and region, create one at the organization level on the *Networking* page. For Serverless clusters, click **Create PrivateLink**.
46+
If you do not already have a PrivateLink resource for your cluster's resource group and region, create one at the organization level on the Networking page. For Serverless clusters, click **Create PrivateLink**.
4747

4848
. Select your https://cloud.redpanda.com/clusters[cluster^], and go to the *Cluster settings* page.
4949
. Under Networking, select **Private Access** and then select an existing PrivateLink.
5050

5151
NOTE: For help with issues enabling PrivateLink, contact https://support.redpanda.com/hc/en-us/requests/new[Redpanda support^].
5252

53+
== Configure PrivateLink connection to Redpanda Cloud
54+
55+
When you have a PrivateLink-enabled cluster, you can create an endpoint to connect your VPC and your cluster.
56+
57+
=== Get cluster domain
58+
59+
Get the domain (`cluster_domain`) of the cluster from the cluster details in the Redpanda Cloud Console.
60+
61+
For example, if the bootstrap server URL is: `cki01qgth38kk81ard3g.any.us-east-1.aw.priv.prd.cloud.redpanda.com:9092`, then `cluster_domain` is: `cki01qgth38kk81ard3g.any.us-east-1.aw.priv.prd.cloud.redpanda.com`.
62+
63+
[,bash]
64+
----
65+
CLUSTER_DOMAIN=<cluster_domain>
66+
----
67+
68+
NOTE: Use `<cluster_domain>` as the domain you target with your DNS conditional forward (optionally also `*.<cluster_domain>` if your DNS platform requires a wildcard).
69+
70+
=== Get name of PrivateLink endpoint service
71+
72+
The service name is required to <<create-vpc-endpoint,create VPC private endpoints>>. You can find the service name in the Redpanda Cloud Console on the Networking page, or by using the Redpanda Cloud API.
73+
74+
[,bash]
75+
----
76+
PL_SERVICE_NAME=<vpc_endpoint_service_name>
77+
----
78+
79+
=== Create client VPC
80+
81+
If you are not using an existing VPC, you must create a new one.
82+
83+
The VPC region must be the same region where the Redpanda cluster is deployed. To create the VPC, run:
84+
85+
[,bash]
86+
----
87+
# See https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html for
88+
# information on profiles and credential files
89+
REGION=<aws-region>
90+
PROFILE=<specific-profile-from-credential-file>
91+
92+
aws ec2 create-vpc --region $REGION --profile $PROFILE --cidr-block 10.0.0.0/20
93+
94+
# Store the client VPC ID from the command output
95+
CLIENT_VPC_ID=<client_vpc_id>
96+
----
97+
98+
You can also use an existing VPC. You need the VPC ID to <<modify-vpc-dns-attributes,modify its DNS attributes>>.
99+
100+
=== Modify VPC DNS attributes
101+
102+
To modify the VPC attributes, run:
103+
104+
[,bash]
105+
----
106+
aws ec2 modify-vpc-attribute --region $REGION --profile $PROFILE --vpc-id $CLIENT_VPC_ID \
107+
--enable-dns-hostnames "{\"Value\":true}"
108+
109+
aws ec2 modify-vpc-attribute --region $REGION --profile $PROFILE --vpc-id $CLIENT_VPC_ID \
110+
--enable-dns-support "{\"Value\":true}"
111+
----
112+
113+
These commands enable DNS hostnames and resolution for instances in the VPC.
114+
115+
=== Create security group
116+
117+
You need the security group ID `security_group_id` from the command output to <<add-security-group-rules,add security group rules>>. To create a security group, run:
118+
119+
[,bash]
120+
----
121+
aws ec2 create-security-group --region $REGION --profile $PROFILE --vpc-id $CLIENT_VPC_ID \
122+
--description "Redpanda endpoint service client security group" \
123+
--group-name "redpanda-privatelink-sg"
124+
SECURITY_GROUP_ID=<security_group_id>
125+
----
126+
127+
=== Add security group rules
128+
129+
The following example shows how to add security group rules to allow access to Redpanda services:
130+
131+
[,bash]
132+
----
133+
# Allow Kafka API bootstrap (seed)
134+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
135+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9092 --cidr 0.0.0.0/0
136+
137+
# Allow Kafka API bootstrap (broker)
138+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
139+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9093 --cidr 0.0.0.0/0
140+
141+
# Allow Kafka API bootstrap (broker)
142+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
143+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9094 --cidr 0.0.0.0/0
144+
145+
# Allow Kafka API bootstrap (broker)
146+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
147+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 9095 --cidr 0.0.0.0/0
148+
149+
# Allow Schema Registry
150+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
151+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 8081 --cidr 0.0.0.0/0
152+
153+
# Allow Redpanda Cloud Data Plane API / Prometheus (if needed)
154+
aws ec2 authorize-security-group-ingress --region $REGION --profile $PROFILE \
155+
--group-id $SECURITY_GROUP_ID --protocol tcp --port 443 --cidr 0.0.0.0/0
156+
----
157+
158+
=== Create VPC subnet
159+
160+
You need the subnet ID `subnet_id` from the command output to <<create-vpc-endpoint,create a VPC endpoint>>. Run the following command, specifying the subnet availability zone (for example, `usw2-az1`):
161+
162+
[,bash]
163+
----
164+
aws ec2 create-subnet --region $REGION --profile $PROFILE --vpc-id $CLIENT_VPC_ID \
165+
--availability-zone <zone> \
166+
--cidr-block 10.0.1.0/24
167+
SUBNET_ID=<subnet_id>
168+
----
169+
170+
=== Create VPC endpoint
171+
172+
The following example shows how to create the VPC endpoint:
173+
174+
[,bash]
175+
----
176+
aws ec2 create-vpc-endpoint \
177+
--region $REGION --profile $PROFILE \
178+
--vpc-id $CLIENT_VPC_ID \
179+
--vpc-endpoint-type "Interface" \
180+
--ip-address-type "ipv4" \
181+
--service-name $PL_SERVICE_NAME \
182+
--subnet-ids $SUBNET_ID \
183+
--security-group-ids $SECURITY_GROUP_ID \
184+
--private-dns-enabled
185+
----
186+
53187
== Access Redpanda services through VPC endpoint
54188

55189
After you have enabled PrivateLink for your cluster, your connection URLs are available in the *How to Connect* section of the cluster overview in the Redpanda Cloud Console.

0 commit comments

Comments
 (0)