2.4. 配置 AWS Direct Connect


此过程描述了接受 Red Hat OpenShift Service on AWS 的 AWS Direct Connect 虚拟接口。有关 AWS Direct Connect 类型和配置的更多信息,请参阅 AWS Direct Connect 组件文档。

2.4.1. AWS Direct Connect 方法

Direct Connect 连接需要一个托管的、连接到一个 Direct Connect Gateway (DXGateway) 的虚拟接口 (VIF),它与一个 Virtual Gateway (VGW) 或一个 Transit Gateway 进行关联,从而可以访问同一个账户或另外一个账户中的远程 VPC。

如果您没有现有的 DXGateway,则需要创建托管的 VIF,在 Red Hat OpenShift Service on AWS AWS 账户中创建 DXGateway 和 VGW。

如果您有一个现有的 DXGateway 连接到一个或多个现有 VGW,该过程涉及 AWS 帐户上的 Red Hat OpenShift Service,将 Association Proposal 发送到 DXGateway 所有者。DXGateway 所有者必须确保所提议的 CIDR 不会与他们关联的任何其他 VGW 冲突。

详情请查看以下 AWS 文档:

重要

当连接到现有的 DXGateway 时,您需要负责相关的成本

有两个可用的配置选项:

方法 1

创建托管的 VIF,然后创建 DXGateway 和 VGW。

方法 2

通过您拥有的现有的 Direct Connect Gateway 请求连接。

2.4.2. 创建托管的虚拟接口

前提条件

  • 收集 Red Hat OpenShift Service on AWS AWS 账户 ID。

2.4.2.1. 确定直接连接连接的类型

查看 Direct Connect Virtual Interface 详情以确定连接的类型。

流程

  1. 登陆到 Red Hat OpenShift Service on AWS AWS Account Dashboard 并选择正确的区域。
  2. Services 菜单选择 Direct Connect
  3. 将有一个或多个虚拟接口等待被接受,请选择其中一个来查看 Summary
  4. 查看虚拟接口类型:private 或 public。
  5. 记录下 Amazon side ASN 的值。

如果 Direct Connect Virtual 接口类型是 Private,则会创建一个虚拟专用网关。如果直接连接虚拟接口是公共的,则会创建一个直接连接网关。

2.4.2.2. 创建私有直接连接

如果 Direct Connect Virtual Interface 类型为 Private,则会创建一个 Private Direct Connect Connect。

流程

  1. 登陆到 Red Hat OpenShift Service on AWS AWS Account Dashboard 并选择正确的区域。
  2. 在 AWS 区域中,从 Services 菜单中选择 VPC
  3. 虚拟专用网络(VPN),选择 虚拟专用网关
  4. 单击 Create virtual private gateway
  5. 为 Virtual Private Gateway 指定一个合适的名称。
  6. Enter custom ASN 字段中选择 Custom ASN,输入前面收集的 Amazon side ASN 值。
  7. 单击 Create virtual private gateway
  8. 点新创建的 Virtual Private Gateway,从 Actions 选项卡中选择 Attach to VPC
  9. 从列表中选择 Red Hat OpenShift Service on AWS Cluster VPC,然后点 Attach VPC

注: 编辑 kubelet 配置将导致重新创建机器池的节点。这是否?

2.4.2.3. 创建公共直接连接

如果 Direct Connect Virtual Interface 类型为 Public,则会创建一个公共直接连接。

流程

  1. 登陆到 Red Hat OpenShift Service on AWS AWS Account Dashboard 并选择正确的区域。
  2. 在 Red Hat OpenShift Service on AWS AWS Account 区域中,选择 Direct Connect from the Services 菜单。
  3. 选择 Direct Connect gatewayCreate Direct Connect gateway
  4. 为直接连接网关指定合适的名称。
  5. Amazon side ASN 中,输入前面收集的 Amazon side ASN 值。
  6. 单击 Create the Direct Connect gateway

2.4.2.4. 验证虚拟接口

在直接连接虚拟接口被接受后,等待一个简短的时间并查看接口的状态。

流程

  1. 登陆到 Red Hat OpenShift Service on AWS AWS Account Dashboard 并选择正确的区域。
  2. 在 Red Hat OpenShift Service on AWS AWS Account 区域中,选择 Direct Connect from the Services 菜单。
  3. 从列表中选择一个 Direct Connect Virtual Interfaces。
  4. 检查 Interface State 的状态为 Available
  5. 检查 Interface BGP 状态是否为 Up
  6. 对剩余的直接连接接口重复此验证。

在 Direct Connect Virtual Interfaces 可用时,您可以在 AWS 帐户仪表板上登录到 Red Hat OpenShift Service,并下载您的侧配置的直接连接配置文件。

2.4.3. 连接到现有直接连接网关

前提条件

  • 确认 AWS VPC 上的 Red Hat OpenShift Service 的 CIDR 范围不会与您关联的任何其他 VGW 冲突。
  • 收集以下信息:

    • 直接连接网关 ID。
    • 与虚拟接口关联的 AWS 帐户 ID。
    • 为 DXGateway 分配的 BGP ASN。可选:也可以使用 Amazon 默认 ASN。

流程

  1. 登陆到 Red Hat OpenShift Service on AWS AWS Account Dashboard 并选择正确的区域。
  2. 在 AWS AWS 帐户区域中的 Red Hat OpenShift Service 中,从 Services 菜单中选择 VPC
  3. 虚拟专用网络(VPN),选择 虚拟专用网关
  4. 选择 Create virtual private gateway
  5. Details 字段中为虚拟专用网关指定合适的名称。
  6. Custom ASN,然后输入前面收集的 Amazon side ASN 值或使用 Amazon Provided ASN。
  7. 单击 Create virtual private gateway
  8. 在 Red Hat OpenShift Service on AWS AWS Account 区域中,选择 Direct Connect from the Services 菜单。
  9. 单击 虚拟专用网关,再选择虚拟专用网关。
  10. 单击 View details
  11. Direct Connect 网关关联 选项卡。
  12. 关联直接连接网关
  13. 关联 帐户类型 下,对于帐户所有者,单击 Another account
  14. 关联设置下,用于直接连接网关 ID,输入 Direct Connect 网关的 ID。
  15. 对于 直接连接网关所有者,请输入拥有直接连接网关的 AWS 帐户的 ID。
  16. 可选:为 允许前缀 添加前缀,使用逗号分隔它们,或者将它们放在单独的行中。
  17. 单击 关联直接连接网关
  18. 在发送关联建议后,它会等待您接受的接受。AWS 文档中提供了您必须执行的最终步骤。

2.4.4. 直接连接故障排除

有关进一步的故障排除文档,请参阅故障排除 AWS 直接连接文档。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat