Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Phạm vi DNS trên đám mây là một cách linh hoạt để đính kèm tài nguyên DNS riêng tư vào đối tượng Google Cloud . Ban đầu, bạn chỉ có thể đính kèm các tài nguyên DNS riêng tư như vùng DNS riêng tư, chính sách và vùng liên kết ngang với các mạng đám mây riêng ảo (VPC). Bằng cách sử dụng phạm vi DNS, bạn không chỉ có thể đính kèm tài nguyên vào nhiều mạng Google Cloud mà còn có thể đính kèm vào một nhóm nhỏ hơn, chẳng hạn như cụm Google Kubernetes Engine (GKE). Thay vì đính kèm tài nguyên DNS riêng tư vào mạng, bạn có thể đính kèm tài nguyên DNS riêng tư vào phạm vi.
Phạm vi Cloud DNS cho phép bạn đính kèm tài nguyên DNS riêng tư vào mạng VPC và cụm GKE.
Trong phạm vi của một phạm vi cụ thể, chẳng hạn như trong một mạng, bạn có thể tạo một chế độ xem tuỳ chỉnh của DNS. Ví dụ: nhiều cụm GKE trong một mạng có thể có hệ phân cấp DNS cluster.local riêng.
Bạn có thể tạo vùng DNS trong phạm vi VPC hoặc trong phạm vi cụm GKE tuỳ thuộc vào việc bạn muốn toàn bộ mạng VPC nhìn thấy tên DNS hay chỉ giới hạn tên DNS trong một cụm GKE:
Phạm vi VPC. Sử dụng phạm vi này khi tên DNS phải được phân giải trên toàn mạng VPC. Vùng DNS trong phạm vi VPC cho phép cung cấp tên DNS trên toàn cầu cho toàn bộ mạng VPC.
Phạm vi cụm GKE. Cloud DNS cho phép bạn tạo một phạm vi cho một cụm GKE.
Sau đó, bạn có thể tạo một hoặc nhiều vùng được quản lý riêng tư cho mỗi cụm, giống như bạn có thể làm cho mạng. Trước tiên, các truy vấn từ cụm đó sẽ kiểm tra xem tài nguyên có phạm vi là cụm GKE cụ thể đó có thể trả lời truy vấn hay không. Nếu không, các truy vấn sẽ quay lại phương thức so khớp thông thường. Phương thức này bắt đầu bằng cách kiểm tra xem có tài nguyên nào trong phạm vi mạng có thể trả lời truy vấn hay không.
Hệ phân cấp phạm vi
Quá trình phân giải DNS diễn ra ở phạm vi cụ thể nhất hiện có, đi lên theo hệ phân cấp khi không tìm thấy vùng trong phạm vi thấp hơn. Cụm là phạm vi cụ thể nhất và Cloud DNS sẽ kiểm tra phạm vi này trước để tìm kết quả trùng khớp.
Phạm vi cũng cho phép khu vực được quản lý và chính sách phản hồi liên kết với một hoặc nhiều bộ chọn trong cùng một phạm vi (nếu có). Bạn có thể định cấu hình một mạng và một phạm vi để liên kết theo các cách sau:
Giữa nhiều mạng
Giữa cụm GKE và mạng
Giữa nhiều mạng và nhiều cụm GKE
Sau khi bạn liên kết một vùng được quản lý hoặc chính sách phản hồi với một bộ chọn, các ứng dụng trong phạm vi đó sẽ thấy vùng hoặc chính sách đó.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Khó hiểu","hardToUnderstand","thumb-down"],["Thông tin hoặc mã mẫu không chính xác","incorrectInformationOrSampleCode","thumb-down"],["Thiếu thông tin/mẫu tôi cần","missingTheInformationSamplesINeed","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-27 UTC."],[[["\u003cp\u003eCloud 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.\u003c/p\u003e\n"],["\u003cp\u003eDNS scopes allow for custom DNS views within their boundaries, such as multiple GKE clusters in a single network having their own \u003ccode\u003ecluster.local\u003c/code\u003e DNS hierarchy.\u003c/p\u003e\n"],["\u003cp\u003eYou 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.\u003c/p\u003e\n"],["\u003cp\u003eDNS resolution follows a hierarchy, starting with the most specific scope (the GKE cluster) and progressively checking broader scopes if a zone is not found.\u003c/p\u003e\n"],["\u003cp\u003eScopes 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.\u003c/p\u003e\n"]]],[],null,["# Scopes and hierarchies\n\nCloud DNS scopes are a flexible way of attaching private DNS resources\nto Google Cloud objects. Originally, you could only attach private DNS\nresources such as private DNS zones, policies, and peering zones to\nVirtual Private Cloud (VPC) networks. By using DNS scopes, you can\nattach resources not only to multiple Google Cloud networks, but also to a\nsmaller grouping, such as a Google Kubernetes Engine (GKE) cluster. Instead\nof attaching private DNS resources to networks, you can attach private DNS\nresources to scopes.\n\nCloud DNS scopes let you attach a private DNS resource to a\nVPC network and a GKE cluster.\nWithin the boundaries of a particular scope, like in a network, you can create\na custom view of DNS. For example, multiple GKE clusters in a\nsingle network can have their own `cluster.local` DNS hierarchy.\n\nYou can create a VPC-scoped or a GKE cluster-scoped\nDNS zone depending on whether you want DNS names to be visible to the entire\nVPC network or limit them to a GKE cluster:\n\n- **VPC scope**. Use this scope when DNS names have to\n be resolved VPC network-wide. A VPC-scoped\n DNS zone lets DNS names be available globally to the entire\n VPC network.\n\n- **GKE cluster scope**. Cloud DNS lets you\n create a scope for a single GKE cluster.\n You can then create one or more private managed zones for each\n cluster, just like you can for networks. Queries from within that\n cluster first check to see if the query can be answered by a\n resource scoped to that specific GKE cluster. If not, queries\n fall back to normal matching, which starts by checking if the query can be\n answered by any network-scoped resources.\n\nScopes hierarchy\n----------------\n\nDNS resolution occurs at the most specific scope available, walking up the\nhierarchy when a zone is not found in a lower scope. The cluster is the most\nspecific scope, and Cloud DNS checks it first for a match.\n\nScopes also let [managed zones](/dns/docs/key-terms#dns-managed-zones) and\n[response policies](/dns/docs/key-terms#response-policy) bind to one or more\nselectors within the same scope (when applicable). You can configure a network\nand a scope to bind in the following ways:\n\n- Between multiple networks\n- Between a GKE cluster and a network\n- Between multiple networks and multiple GKE clusters\n\nAfter you bind a managed zone or response policy to a selector, it is visible to\nclients within the scope.\n\nTo learn how to configure a cluster-scoped Cloud DNS zone, see\n[Configure a GKE cluster scope](/dns/docs/zones/configure-scopes).\n\nWhat's next\n-----------\n\n- To find solutions for common issues that you might encounter when using Cloud DNS, see [Troubleshooting](/dns/docs/troubleshooting).\n- To learn more about Cloud DNS response policies, see [Manage response policies and rules](/dns/docs/zones/manage-response-policies).\n- To learn more about zones, see [Create, modify, and delete zones](/dns/docs/zones)."]]