本页面上的部分或全部信息可能不适用于 Trusted Cloud by S3NS。
范围和层次结构
Cloud DNS 范围是一种将专用 DNS 资源附加到 Trusted Cloud by S3NS 对象的灵活方式。最初,您只能将专用 DNS 资源(例如专用 DNS 地区、政策和对等互连地区)连接到 Virtual Private Cloud (VPC) 网络。使用 DNS 范围,您不仅可以将资源挂接到多个 Trusted Cloud 网络,还可以将资源挂接到更小的分组(例如 Google Kubernetes Engine [GKE] 集群)。您可以将专用 DNS 资源附加到范围,而不是将网络 DNS 资源附加到网络。
借助 Cloud DNS 范围,您可以将专用 DNS 资源附加到 VPC 网络和 GKE 集群。您可以在特定范围的边界内(例如在网络中)创建自定义 DNS 视图。例如,一个网络中的多个 GKE 集群可以有自己的 cluster.local
DNS 层次结构。
根据您希望向整个 VPC 网络显示 DNS 名称还是对 GKE 集群使用 DNS 名称,您可以创建 VPC 范围或 GKE 集群级 DNS 地区:
VPC 范围。如果 DNS 名称必须在网络范围内解析,请使用此范围。VPC 范围的 DNS 区域允许 DNS 名称可用于整个 VPC 网络。
GKE 集群范围。Cloud DNS 允许您为单个 GKE 集群创建范围。然后,您可以为每个集群创建一个或多个专用托管地区,就像为网络创建托管地区一样。来自该集群的查询首先检查该查询是否可由范围限定于该特定 GKE 集群的资源应答。否则,查询会回退到正常匹配,首先检查网络级资源是否可以解答查询。
范围层次结构
DNS 解析发生在最具体的可用范围内,而在较低范围内找不到地区时,将遍历层次结构。集群是最具体的范围,Cloud DNS 会先检查有无匹配项。
访问权限范围还允许托管地区和响应政策绑定到同一范围内的一个或多个选择器(如适用)。您可以通过以下方式配置网络和范围进行绑定:
- 在多个网络之间
- 在 GKE 集群和网络之间
- 在多个网络和多个 GKE 集群之间
将托管地区或响应政策绑定到选择器后,客户端可以向范围内的客户端显示该政策。
如需了解如何配置集群级 Cloud DNS 可用区,请参阅配置 GKE 集群范围。
后续步骤
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-11。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-11。"],[[["Cloud DNS scopes enable the attachment of private DNS resources to multiple Google Cloud networks or specific groupings like GKE clusters, offering enhanced flexibility compared to the previous VPC network-only method."],["DNS scopes allow for custom DNS views within their boundaries, such as multiple GKE clusters in a single network having their own `cluster.local` DNS hierarchy."],["You can establish either a VPC-scoped DNS zone for network-wide DNS resolution or a GKE cluster-scoped DNS zone to confine DNS name resolution to a single GKE cluster."],["DNS resolution follows a hierarchy, starting with the most specific scope (the GKE cluster) and progressively checking broader scopes if a zone is not found."],["Scopes enable managed zones and response policies to be bound to selectors within the same scope, allowing for flexible configurations between multiple networks, GKE clusters, or a combination of both."]]],[]]