注意
此功能不适用于免费集群和 Flex 集群。要详细学习;了解哪些功能不可用,请参阅 Atlas免费集群限制。
为集群设立私有端点后,请按照以下步骤管理和连接Atlas私有端点。
要了解有关在 Atlas 中使用私有端点的更多信息,请参阅了解 Atlas 中的私有端点。
必需的访问权限
要查看私有端点,您必须拥有该项目的Project Read Only访问权限。
要删除私有端点,您必须具有该项目的 Project Owner 或更高访问权限。
拥有 Organization Owner 访问权限的用户必须将自己作为 Project Owner 添加到项目中。
Considerations
对于多区域集群,您必须为每个附带节点的区域创建一个私有终结点。
如果您正对多区域集群进行维护,在维护完成之前,请勿更改或删除私有终结点,以免出现集群停机。
如果您要从多区域集群迁移到单区域集群,则必须在确保集群可使用新的单区域设置来完全正常运行,且您已将所有流量通过新的单区域私有终结点进行传输后,才能删除旧的私有终结点。
从私有端点连接
重要
有关私有端点感知连接字符串的注意事项,请参阅私有端点感知连接字符串。
通过以下步骤,使用私有端点感知连接string连接到Atlas集群:
在Atlas中,转到项目的 Clusters 页面。
如果尚未显示,请从导航栏上的 Organizations 菜单中选择包含所需项目的组织。
如果尚未显示,请从导航栏的Projects菜单中选择所需的项目。
在侧边栏中,单击 Database 标题下的 Clusters。
显示 集群页面。
创建数据库用户。
重要
如果 Atlas 在 Setup connection security(设置连接安全)步骤中指示项目中至少已配置一个数据库用户,请跳过此步骤。如要管理现有数据库用户,请参阅配置数据库用户。
要访问集群,您需要一个MongoDB用户,该用户可以访问项目集群上所需的一个或多个数据库。如果您的项目没有MongoDB用户,Atlas会提示您创建具有Atlas Admin角色的新用户。
输入新用户的 Username(用户名)。
输入此新用户的 Password(密码)或单击 Autogenerate Secure Password(自动生成安全密码)。
单击 Create Database User(创建数据库用户)以保存此用户。
在以下步骤中,使用此用户连接集群。
添加数据库用户后,点击 Choose Your Connection Method。
查看私有端点
端点
要返回使用Amazon Web Services 指定的Atlas CLI 私有端点的详细信息,请运行以下命令:
atlas privateEndpoints aws describe <privateEndpointId> [options]
要使用 Atlas CLI 列出项目中的所有 AWS 私有终结点,运行以下命令:
atlas privateEndpoints aws list [options]
要学习;了解有关上述命令的语法和参数的更多信息,请参阅Atlas CLI文档,了解Atlas privateEndpoints Amazon Web Services describe和Atlas privateEndpoints Amazon Web Services list。
接口端点
返回指定的 AWS 私有终结点接口。要使用 Atlas CLI,运行以下命令:
atlas privateEndpoints aws interfaces describe <interfaceEndpointId> [options]
要了解有关命令语法和参数的更多信息,请参阅 Atlas CLI 文档中的 atlas privateEndpoints aws interfaces describe。
端点
要使用Atlas CLI返回指定的Azure私有端点的详细信息,请运行以下命令:
atlas privateEndpoints azure describe <privateEndpointId> [options]
要使用Atlas CLI列出项目中的所有Azure私有端点,请运行以下命令:
atlas privateEndpoints azure list [options]
要学习;了解有关上述命令的语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsAzure describe 和Atlas privateEndpointsAzure list 的 文档。
接口端点
返回指定的Azure私有端点接口。 使用Atlas CLI,运行以下命令:
atlas privateEndpoints azure interfaces describe <privateEndpointResourceId> [options]
要了解有关命令语法和参数的更多信息,请参阅 Atlas CLI 文档中的 atlas privateEndpoints azure interfaces describe 部分。
端点
Google Cloud Platform要使用 返回指定的Atlas CLI 私有端点的详细信息,请运行以下命令:
atlas privateEndpoints gcp describe <privateEndpointId> [options]
要使用Google Cloud Platform 列出项目中的所有Atlas CLI 私有端点,请运行以下命令:
atlas privateEndpoints gcp list [options]
要学习;了解有关上述命令的语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsGCP describe 和Atlas privateEndpointsGCP list 的 文档。
接口端点
返回您指定的Google Cloud Platform私有端点接口。 使用Atlas CLI,运行以下命令:
atlas privateEndpoints gcp interfaces describe <id> [options]
要学习;了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsGCP 接口描述 的 文档。
从 Atlas 中删除私有端点
端点
要删除使用 Atlas CLI 指定的 AWS 私有终结点,运行以下命令:
atlas privateEndpoints aws delete <privateEndpointId> [options]
要了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsAmazon Web Services delete 的 文档。
接口端点
要删除使用 Atlas CLI 指定的 AWS 私有终结点接口,运行以下命令:
atlas privateEndpoints aws interfaces delete <interfaceEndpointId> [options]
要了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsAmazon Web Services 接口删除 的 文档。
端点
要删除使用Atlas CLI指定的Azure私有端点,请运行以下命令:
atlas privateEndpoints azure delete <privateEndpointId> [options]
要学习;了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsAzure 删除 的 文档。
接口端点
要删除使用Atlas CLI指定的Azure私有端点接口,请运行以下命令:
atlas privateEndpoints azure interfaces delete <privateEndpointResourceId> [options]
要学习;了解有关命令语法和参数的更多信息,请参阅Atlas CLI文档中的Atlas privateEndpoints Azure Interfaces 删除。
端点
要删除使用Google Cloud Platform 指定的Atlas CLI 私有端点,请运行以下命令:
atlas privateEndpoints gcp delete <privateEndpointId> [options]
要学习;了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsGCP 删除 的 文档。
接口端点
要删除使用Google Cloud Platform 指定的Atlas CLI 私有端点接口,请运行以下命令:
atlas privateEndpoints gcp interfaces delete <id> [options]
要学习;了解有关命令语法和参数的更多信息,请参阅Atlas CLI AtlasprivateEndpointsGCP 接口删除 的 文档。
管理AWS PrivateLink接受的终结点区域
您可以配置哪些AWS区域可以连接到您的私有端点服务。这样可以实现跨区域私有端点连接,从而允许不同 AWS 区域中的应用程序通过私有端点连接到您的Atlas集群。
要在Atlas用户界面中添加或删除已接受的终结点区域,请执行以下操作:
在接受的区域配置终结点。
添加接受的端点区域后,您必须在您的AWS账户的这些区域中创建相应的接口端点。要学习;了解有关创建接口端点的更多信息,请参阅为专用集群设置私有端点。