Skip to content

Commit

Permalink
new-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
qqqdan committed Aug 17, 2024
1 parent ed8b63c commit 8f394ff
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ In most scenarios, it is recommended that you use private endpoint connection ov
To connect to your TiDB Dedicated cluster via a private endpoint, complete the [prerequisites](#prerequisites) and follow these steps:

1. [Choose a TiDB cluster](#step-1-choose-a-tidb-cluster)
2. [Provide the information for creating an endpoint](#step-2-provide-the-information-for-creating-an-endpoint)
2. [Create a Google Cloud endpoint](#step-2-create-a-google-cloud-endpoint)
3. [Accept endpoint access](#step-3-accept-endpoint-access)
4. [Connect to your TiDB cluster](#step-4-connect-to-your-tidb-cluster)

Expand Down Expand Up @@ -75,11 +75,11 @@ Perform the following steps to go to the **Google Cloud Private Endpoint** page:
1. Log in to the [TiDB Cloud console](https://tidbcloud.com).
2. Click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner, switch to the target project if you have multiple projects, and then click **Project Settings**.
3. On the **Project Settings** page of your project, click **Network Access** in the left navigation pane, and click the **Private Endpoint** tab.
4. Click **Create Private Endpoint** in the upper-right corner, and then select **Google Cloud Private Endpoint**.
4. Click **Google Cloud** to view the Google Cloud private endpoints, and then select **Create Google Cloud Private Endpoint Connection**.

### Step 1. Choose a TiDB cluster

Click the drop-down list and choose an available TiDB Dedicated cluster.
Select an TiDB Dedicated cluster from the drop-down list for which you wish to establish a private endpoint connection.

You can select a cluster with any of the following statuses:

Expand All @@ -88,7 +88,7 @@ You can select a cluster with any of the following statuses:
- **Modifying**
- **Importing**

### Step 2. Provide the information for creating an endpoint
### Step 2. Create a Google Cloud endpoint

1. Provide the following information to generate the command for private endpoint creation:
- **Google Cloud Project ID**: the Project ID associated with your Google Cloud account. You can find the ID on the [Google Cloud **Dashboard** page](https://console.cloud.google.com/home/dashboard).
Expand All @@ -97,7 +97,7 @@ You can select a cluster with any of the following statuses:
- **Private Service Connect Endpoint Name**: enter a unique name for the private endpoint that will be created.
2. After entering the information, click **Generate Command**.
3. Copy the command.
4. Go to [Google Cloud Shell](https://console.cloud.google.com/home/dashboard) to execute the command.
4. Go to [Google Cloud Shell](https://console.cloud.google.com/home/dashboard) to execute the command to create an endpoint.

### Step 3. Accept endpoint access

Expand Down
54 changes: 23 additions & 31 deletions tidb-cloud/set-up-private-endpoint-connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@ In most scenarios, you are recommended to use private endpoint connection over V
To connect to your TiDB Dedicated cluster via a private endpoint, complete the [prerequisites](#prerequisites) and follow these steps:

1. [Choose a TiDB cluster](#step-1-choose-a-tidb-cluster)
2. [Check the service endpoint region](#step-2-check-the-service-endpoint-region)
3. [Create an AWS interface endpoint](#step-3-create-an-aws-interface-endpoint)
4. [Accept the endpoint connection](#step-4-accept-the-endpoint-connection)
5. [Enable private DNS](#step-5-enable-private-dns)
6. [Connect to your TiDB cluster](#step-6-connect-to-your-tidb-cluster)
2. [Create an AWS interface endpoint](#step-2-create-an-aws-interface-endpoint)
3. [Fill in your endpoint ID](#step-3-fill-in-your-endpoint-id)
4. [Enable private DNS and create connection](#step-4-enable-private-dns-and-create-connection)
5. [Connect to your TiDB cluster](#step-5-connect-to-your-tidb-cluster)

If you have multiple clusters, you need to repeat these steps for each cluster that you want to connect to using AWS PrivateLink.

Expand All @@ -54,34 +53,28 @@ If you have multiple clusters, you need to repeat these steps for each cluster t
1. Log in to the [TiDB Cloud console](https://tidbcloud.com).
2. Click <MDSvgIcon name="icon-left-projects" /> in the lower-left corner, switch to the target project if you have multiple projects, and then click **Project Settings**.
3. On the **Project Settings** page of your project, click **Network Access** in the left navigation pane, and click the **Private Endpoint** tab.
4. Click **Create Private Endpoint** in the upper-right corner, and then select **AWS Private Endpoint**.
4. Click **Create Private Endpoint Connection** in the upper-right corner.

### Step 1. Choose a TiDB cluster

1. Click the drop-down list and choose an available TiDB Dedicated cluster.
2. Click **Next**.
1. Select an available TiDB Dedicated cluster from the drop-down list for which you wish to establish a private endpoint connection.

### Step 2. Check the service endpoint region

Your service endpoint region is selected by default. Have a quick check and click **Next**.

> **Note:**
>
> The default region is where your cluster is located. Do not change it. Cross-region private endpoint is currently not supported.
### Step 3. Create an AWS interface endpoint
### Step 2. Create an AWS interface endpoint

> **Note:**
>
> For each TiDB Dedicated cluster created after March 28, 2023, the corresponding endpoint service is automatically created 3 to 4 minutes after the cluster creation.
If you see the `Endpoint Service Ready` message, take note of your endpoint service name from the command in the lower area of the console for later use. Otherwise, wait 3 to 4 minutes to let TiDB Cloud create an endpoint service for your cluster.
If you see the `TiDB Private Link Service is ready` message, the corresponding endpoint service is ready and you cancollect information needed for creating the endpoint.

1. Fill in the **VPC ID** and **Subnet IDs** fields on the private endpoint creation page. You can get the IDs from your AWS Management Console.
2. Click **Generate Command** to get the following endpoint creation command.

```bash
aws ec2 create-vpc-endpoint --vpc-id ${your_vpc_id} --region ${your_region} --service-name ${your_endpoint_service_name} --vpc-endpoint-type Interface --subnet-ids ${your_application_subnet_ids}
```

Then create an AWS interface endpoint either using the AWS Management Console or using the AWS CLI.
Then you can create an AWS interface endpoint either using the AWS Management Console or using the AWS CLI.

<SimpleTab>
<div label="Use AWS Console">
Expand All @@ -96,7 +89,7 @@ To use the AWS Management Console to create a VPC interface endpoint, perform th
![Verify endpoint service](/media/tidb-cloud/private-endpoint/create-endpoint-2.png)

3. Select **Other endpoint services**.
4. Enter the service name that you found in the TiDB Cloud console.
4. Enter the service name that you found in the generated command from "--service-name ${your_endpoint_service_name}" part.
5. Click **Verify service**.
6. Select your VPC in the drop-down list.
7. Select the availability zones where your TiDB cluster is located in the **Subnets** area.
Expand All @@ -118,27 +111,26 @@ To use the AWS Management Console to create a VPC interface endpoint, perform th

To use the AWS CLI to create a VPC interface endpoint, perform the following steps:

1. Fill in the **VPC ID** and **Subnet IDs** fields on the private endpoint creation page. You can get the IDs from your AWS Management Console.
2. Copy the command in the lower area of the page and run it in your terminal. Then click **Next**.
1. Copy the generated command in the lower area of the page and run it in your terminal.
2. Record the VPC endpoint ID you just created.

> **Tip:**
>
> - Before running the command, you need to have AWS CLI installed and configured. See [AWS CLI configuration basics](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html) for details.
>
> - If your service is spanning across more than three availability zones (AZs), you will get an error message indicating that the VPC endpoint service does not support the AZ of the subnet. This issue occurs when there is an extra AZ in your selected region in addition to the AZs where your TiDB cluster is located. In this case, you can contact [PingCAP Technical Support](https://docs.pingcap.com/tidbcloud/tidb-cloud-support).
>
> - You cannot copy the command until TiDB Cloud finishes creating an endpoint service in the background.

</div>
</SimpleTab>

### Step 4. Accept the endpoint connection
### Step 3. Fill in your endpoint ID

1. Go back to the TiDB Cloud console.
2. Fill in the box with your VPC endpoint ID on the **Create Private Endpoint** page.
3. Click **Next**.
2. Fill in the box with your VPC endpoint ID on the **Create AWS Private Endpoint Connection** page.


### Step 5. Enable private DNS
### Step 4. Enable private DNS and create connection

Enable private DNS in AWS. You can either use the AWS Management Console or the AWS CLI.

Expand Down Expand Up @@ -166,11 +158,11 @@ aws ec2 modify-vpc-endpoint --vpc-endpoint-id ${your_vpc_endpoint_id} --private-
</div>
</SimpleTab>

Click **Create** in the TiDB Cloud console to finalize the creation of the private endpoint.
Click **Create Private Endpoint Connection** in the TiDB Cloud console to finalize the creation of the private endpoint.

Then you can connect to the endpoint service.
Then you can connect to your TiDB cluster.

### Step 6. Connect to your TiDB cluster
### Step 5. Connect to your TiDB cluster

After you have enabled the private DNS, go back to the TiDB Cloud console and take the following steps:

Expand Down

0 comments on commit 8f394ff

Please sign in to comment.