Cloud DNS 範圍是將私人 DNS 資源附加至 Google Cloud 物件的彈性方式。原本,您只能將私人 DNS 區域、政策和對等互連區域等私人 DNS 資源附加至虛擬私有雲 (VPC) 網路。使用 DNS 範圍後,您不僅可以將資源連結至多個 Google Cloud 網路,還可以連結至較小的群組,例如 Google Kubernetes Engine (GKE) 叢集。您可以將私人 DNS 資源附加至範圍,而非附加至網路。
Cloud DNS 範圍可讓您將私人 DNS 資源附加至 VPC 網路和 GKE 叢集。您可以在特定範圍 (例如網路) 的邊界內,建立 DNS 的自訂檢視畫面。舉例來說,單一網路中的多個 GKE 叢集可以擁有各自的 cluster.local DNS 階層。
您可以根據是否要讓 DNS 名稱對整個 VPC 網路可見,或將其限制在 GKE 叢集內,來建立 VPC 範圍或 GKE 叢集範圍的 DNS 區域:
虛擬私有雲範圍。如需在整個 VPC 網路中解析 DNS 名稱,請使用這個範圍。虛擬私有雲範圍 DNS 區域可讓 DNS 名稱在全球範圍內提供給整個虛擬私有雲網路。
GKE 叢集範圍。Cloud DNS 可讓您為單一 GKE 叢集建立範圍。接著,您可以為每個叢集建立一或多個私人代管區域,就像為網路建立區域一樣。該叢集中的查詢會先檢查查詢是否可由特定 GKE 叢集的資源回答。如果沒有,查詢會改為使用一般比對方式,首先檢查是否有任何網路範圍的資源可回答查詢。
範圍階層
DNS 解析會在可用的最具體範圍中發生,如果在較低範圍中找不到區域,就會向上逐層搜尋。叢集是最具體的範圍,Cloud DNS 會先檢查這個範圍是否有相符項目。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-09 (世界標準時間)。"],[[["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."]]],[]]