-
Notifications
You must be signed in to change notification settings - Fork 4
DOC-1348: Document cross-region AWS PrivateLink feature #480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
micheleRP
wants to merge
7
commits into
main
Choose a base branch
from
DOC-1348-cross-region-aws-privatelink
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+98
−8
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0a84d0b
DOC-1348: Document cross-region AWS PrivateLink feature
micheleRP 9d655c3
DOC-1348: Add Cloud UI documentation for cross-region PrivateLink
micheleRP 5f20adf
DOC-1348: Add note that supported regions only appears for multi-AZ c…
micheleRP f34c40f
style edits
micheleRP 50aa5c2
style edit
micheleRP e71a0a4
incorporate comments from code review
micheleRP f548f76
incorporate doc review feedback
micheleRP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,10 +19,10 @@ Consider using the PrivateLink endpoint service if you have multiple VPCs and co | |
|
|
||
| After <<get-a-cloud-api-access-token,getting an access token>>, you can <<create-new-cluster-with-privatelink-endpoint-service-enabled,enable PrivateLink when creating a new cluster>>, or you can <<enable-privatelink-endpoint-service-for-existing-clusters,enable PrivateLink for existing clusters>>. | ||
|
|
||
| == Requirements | ||
| == Prerequisites | ||
|
|
||
| * Install `rpk`. | ||
| * Your Redpanda cluster and <<create-client-vpc,VPC>> must be in the same region. | ||
| * Your Redpanda cluster and <<create-client-vpc,VPC>> must be in the same region, unless you configure <<cross-region-privatelink,cross-region PrivateLink>>. | ||
| * In this guide, you use the link:/api/doc/cloud-controlplane/topic/topic-cloud-api-overview[Redpanda Cloud API] to enable the Redpanda endpoint service for your clusters. Follow the steps below to <<get-an-access-token,get an access token>>. | ||
| * Use the https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html[AWS CLI^] to create a new client VPC or modify an existing one to use the PrivateLink endpoint. | ||
|
|
||
|
|
@@ -93,6 +93,7 @@ In the example below, make sure to set your own values for the following fields: | |
| - `name` | ||
| - `connect_console`: Whether to enable connections to Redpanda Console (boolean) | ||
| - `allowed_principals`: Amazon Resource Names (ARNs) for the AWS principals allowed to access the endpoint service. For example, for all principals in an account, use `"arn:aws:iam::account_id:root"`. See https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html#add-remove-permission[Configure an endpoint service^] for details. | ||
| - `supported_regions`: (Optional) List of AWS regions from which PrivateLink endpoints can connect to Redpanda. Required only for <<cross-region-privatelink,cross-region PrivateLink>>. For example, `["us-east-1", "us-west-2"]`. | ||
| -- | ||
| + | ||
| [,bash] | ||
|
|
@@ -112,7 +113,8 @@ CLUSTER_POST_BODY=`cat << EOF | |
| "aws_private_link": { | ||
| "enabled": true, | ||
| "connect_console": true, | ||
| "allowed_principals": ["<principal_1>","<principal_2>"] | ||
| "allowed_principals": ["<principal_1>","<principal_2>"], | ||
| "supported_regions": ["<region_1>","<region_2>"] | ||
| } | ||
| } | ||
| } | ||
|
|
@@ -158,6 +160,7 @@ In the example below, make sure to set your own value for the following field: | |
| -- | ||
| - `connect_console`: Whether to enable connections to Redpanda Console (boolean) | ||
| - `allowed_principals`: Amazon Resource Names (ARNs) for the AWS principals allowed to access the endpoint service. For example, for all principals in an account, use `"arn:aws:iam::account_id:root"`. See https://docs.aws.amazon.com/vpc/latest/privatelink/configure-endpoint-service.html#add-remove-permission[Configure an endpoint service^] for details. | ||
| - `supported_regions`: (Optional) List of AWS regions from which PrivateLink endpoints can connect to Redpanda. Required only for <<cross-region-privatelink,cross-region PrivateLink>>. For example, `["us-east-1", "us-west-2"]`. | ||
| -- | ||
| + | ||
| [,bash] | ||
|
|
@@ -167,7 +170,8 @@ CLUSTER_PATCH_BODY=`cat << EOF | |
| "aws_private_link": { | ||
| "enabled": true, | ||
| "connect_console": true, | ||
| "allowed_principals": ["<principal_1>","<principal_2>"] | ||
| "allowed_principals": ["<principal_1>","<principal_2>"], | ||
| "supported_regions": ["<region_1>","<region_2>"] | ||
| } | ||
| } | ||
| EOF` | ||
|
|
@@ -234,7 +238,7 @@ xref:networking:byoc/aws/vpc-peering-aws.adoc[VPC peering] and PrivateLink will | |
| VPC peering and PrivateLink can both be used at the same time if Kafka clients are connecting from distinct VPCs. For example, in a private Redpanda cluster, you can connect your internal Kafka clients over VPC peering, and enable PrivateLink for external services. | ||
| ==== | ||
|
|
||
| The VPC region must be the same region where the Redpanda cluster is deployed. To create the VPC, run: | ||
| The client VPC must be in the same region as your Redpanda cluster, unless you have configured <<cross-region-privatelink,cross-region PrivateLink>>. To create the VPC, run: | ||
|
|
||
| [,bash] | ||
| ---- | ||
|
|
@@ -346,6 +350,61 @@ After you have enabled PrivateLink for your cluster, your connection URLs are av | |
|
|
||
| include::networking:partial$private-links-access-rp-services-through-vpc.adoc[] | ||
|
|
||
| == Cross-region PrivateLink | ||
|
|
||
| By default, AWS PrivateLink only allows connections from VPCs in the same region as the endpoint service. Cross-region PrivateLink enables clients in different AWS regions to connect to your Redpanda cluster through PrivateLink. | ||
|
|
||
| For more information about AWS cross-region PrivateLink support, see the https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-share-your-services.html#endpoint-service-cross-region[AWS documentation^]. | ||
|
|
||
| === Requirements | ||
|
|
||
| * The Redpanda cluster must be deployed across multiple availability zones (multi-AZ). This is an AWS limitation for cross-region PrivateLink. | ||
| * Cross-region PrivateLink is configured through the `supported_regions` field in the `aws_private_link` configuration. This field only appears in the API response for multi-AZ clusters. | ||
| * For BYOC clusters, the Redpanda agent IAM role must have `vpce:AllowMultiRegion` and `elasticloadbalancing:DescribeListenerAttributes` permissions. | ||
|
|
||
| === Configure cross-region PrivateLink | ||
|
|
||
| To enable cross-region PrivateLink, add the `supported_regions` field to your `aws_private_link` configuration when <<create-new-cluster-with-privatelink-endpoint-service-enabled,creating a new cluster>> or <<enable-privatelink-endpoint-service-for-existing-clusters,enabling PrivateLink on an existing cluster>>. | ||
|
|
||
| The `supported_regions` field accepts a list of AWS region identifiers where you want to allow PrivateLink connections from. For example: | ||
|
|
||
| [,json] | ||
| ---- | ||
| "aws_private_link": { | ||
| "enabled": true, | ||
| "connect_console": true, | ||
| "allowed_principals": ["arn:aws:iam::123456789012:root"], | ||
| "supported_regions": ["us-east-1", "us-west-2", "eu-west-1"] | ||
| } | ||
| ---- | ||
|
|
||
| With this configuration, clients in VPCs located in `us-east-1`, `us-west-2`, and `eu-west-1` can create PrivateLink endpoints that connect to your Redpanda cluster, regardless of which region the cluster is deployed in. | ||
|
|
||
| === Create a cross-region VPC endpoint | ||
|
|
||
| When creating a VPC endpoint in a different region than your Redpanda cluster, use the same process as <<create-vpc-endpoint,creating a standard VPC endpoint>>, but specify both the client VPC's region and the service region where your Redpanda cluster is deployed. | ||
|
|
||
| NOTE: The `--service-region` option requires AWS CLI version 2.22.0 or later. Run `aws --version` to check your version and https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html[update if necessary^]. | ||
|
|
||
| [,bash] | ||
| ---- | ||
| # CLIENT_REGION is the region where your client VPC is located | ||
| # SERVICE_REGION is the region where your Redpanda cluster is deployed | ||
| CLIENT_REGION=<client_region> | ||
| SERVICE_REGION=<service_region> | ||
|
|
||
| aws ec2 create-vpc-endpoint \ | ||
| --region $CLIENT_REGION --profile $PROFILE \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add We should also mention for updating aws cli with the latest since an older aws might not have the option |
||
| --service-region $SERVICE_REGION \ | ||
| --vpc-id $CLIENT_VPC_ID \ | ||
| --vpc-endpoint-type "Interface" \ | ||
| --ip-address-type "ipv4" \ | ||
| --service-name $PL_SERVICE_NAME \ | ||
| --subnet-ids $SUBNET_ID \ | ||
| --security-group-ids $SECURITY_GROUP_ID \ | ||
| --private-dns-enabled | ||
| ---- | ||
|
|
||
| == Test the connection | ||
|
|
||
| You can test the PrivateLink connection from any VM or container in the consumer VPC. If configuring a client isn't possible right away, you can do these checks using `rpk` or cURL: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing AWS permissions and feature flag documentation per PR objectives.
The PR objectives specify documenting "new required AWS permissions: vpce:AllowMultiRegion and elasticloadbalancing:DescribeListenerAttributes" and "the feature flag guarding the capability." Neither is present in the Requirements section or elsewhere in the new cross-region documentation.
Add the missing AWS permissions and feature flag guidance. These should be included in the Requirements subsection (lines 359-363) so users understand all prerequisites before attempting to configure cross-region PrivateLink.
🤖 Prompt for AI Agents
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new perms should be added to here. But the page is outdated, especially it does not include the perms related to Private Link. Can we add the perms in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Length of output: 429
🏁 Script executed:
Length of output: 34391
🏁 Script executed:
Length of output: 0
🏁 Script executed:
Length of output: 140
🌐 Web query:
💡 Result:
Short answer
Key points
Minimal example IAM statement (allow only two service Regions)
{
"Effect":"Allow",
"Action":"vpce:AllowMultiRegion",
"Resource":"arn:aws:ec2:::vpc-endpoint/*",
"Condition":{
"StringLike":{"ec2:VpceServiceRegion":["ap-northeast-1","eu-west-1"]}
}
}
(Adapt Principal/Resource to your use case.) [3]
Sources
🌐 Web query:
💡 Result:
Short answer: DescribeListenerAttributes is an ELBv2 (regional) API that returns attributes for a listener on a load balancer in the region you call. For a PrivateLink (VPCE service) that is hosted in another AWS Region, call DescribeListenerAttributes (or aws elbv2 describe-listener-attributes) against the load balancer's region (or set --region to the service region / use that region's endpoint). PrivateLink cross‑region itself does not change which ELB API region you must call. [1][2]
Practical notes:
Sources:
[1] AWS PrivateLink cross‑region announcement and docs.
[2] ELBv2 DescribeListenerAttributes / API reference.
[3] AWS CLI elbv2 describe-listener-attributes reference.
@paulzhang97Yes, adding the IAM permissions documentation to this PR makes sense since users will need these permissions to use cross-region PrivateLink.I can help plan the code changes to update
modules/security/pages/authorization/cloud-iam-policies.adoc. From the PR objectives and my research, I've confirmed the two new permissions for cross-region PrivateLink:vpce:AllowMultiRegion- Required for both service providers and consumers to enable cross-region PrivateLink connectionselasticloadbalancing:DescribeListenerAttributes- Required to retrieve listener attributes for the Network Load Balancer backing the PrivateLink serviceHowever, I cannot access the private
cloudv2repository you linked to see the existing PrivateLink permissions at lines 425-457. Could you either:Once I have this information, I can plan the code changes to add a dedicated PrivateLink permissions section (or update the VPC Management section) in the IAM policies documentation with both the new cross-region permissions and any missing existing permissions.
Would you like me to proceed with planning these changes?
🧠 Learnings used