Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Questa pagina ti guida alla configurazione della risoluzione DNS per un nuovo dominio in Google Distributed Cloud (GDC) air-gapped.
In GDC tramite l'utilizzo di zone DNS.
Il pubblico di destinazione di questa pagina è costituito da amministratori di piattaforme e operatori di applicazioni
responsabili della gestione della risoluzione DNS per la propria organizzazione.
Puoi creare zone DNS pubbliche o private nel tuo ambiente GDC in modo che corrispondano ai requisiti di visibilità e accesso dei tuoi servizi:
Per i servizi che richiedono visibilità e accesso alla rete esterna: configura
una zona DNS pubblica per consentire a utenti e sistemi esterni alla tua rete di accedere
al tuo servizio. Se hai un sito web, un'API pubblica o un servizio
che deve essere raggiungibile dall'esterno del tuo ambiente
GDC Cloud, hai bisogno di una zona DNS pubblica per mappare il tuo nome di dominio agli
indirizzi IP appropriati.
Per i servizi che richiedono l'accesso sicuro e limitato ai sistemi interni: configura una zona DNS privata per nascondere il nome di dominio interno e limitare l'accesso ai servizi interni. Se hai un'applicazione, un database o un microservizio interno che deve comunicare con altri servizi interni utilizzando solo protocolli sicuri e indirizzi IP privati, hai bisogno di una zona DNS privata per mappare il tuo nome di dominio agli indirizzi IP appropriati. Una zona DNS privata garantisce che questi servizi possano trovarsi a vicenda utilizzando nomi di dominio interni senza esporre la loro esistenza o i loro indirizzi IP alla rete esterna. In questo modo si migliora la sicurezza
e si semplifica il networking interno.
Per ulteriori informazioni sulla differenza tra zone DNS pubbliche e private, vedi Tipi di zone per Cloud DNS.
Prima di iniziare
Per configurare le zone DNS in GDC e aggiungere record, devi
disporre di quanto segue:
GLOBAL_API_SERVER: il percorso kubeconfig del server API globale. Per ulteriori
informazioni, vedi Server API globali e di zona.
Se non hai ancora generato un file kubeconfig per il server API, consulta la sezione
Accedi per maggiori dettagli.
DNS_ZONE_NAME: il nome della zona DNS.
PROJECT_NAMESPACE: lo spazio dei nomi del progetto.
DOMAIN_NAME: il nome di dominio per la tua zona
DNS pubblica, ad esempio example.com.
DESCRIPTION: una descrizione della zona DNS.
Ad esempio, Public DNS zone for example.com. Questo campo è facoltativo.
Per una zona DNS pubblica, devi configurare il resolver DNS nella tua rete in modo che inoltri le richieste DNS per quella zona DNS ai server dei nomi in GDC che ospitano la zona DNS. I server dei nomi sono elencati nello stato di una risorsa personalizzata ManagedDNSZone:
Per questo esempio, il resolver DNS deve essere aggiornato per inoltrare
le richieste per example.com a
ns.managed-dns-public.gdc1.staging.gpcdemolabs.com. Questa configurazione presuppone che il resolver disponga già della configurazione necessaria per inoltrare correttamente le richieste DNS per la zona DNS dell'infrastruttura di GDC gdc1.staging.gpcdemolabs.com.
Crea una zona DNS privata
Utilizza l'API Kubernetes per creare una zona DNS privata:
Crea e applica una risorsa ManagedDNSZone per creare una zona DNS
accessibile solo dall'interno del VPC cliente predefinito:
GLOBAL_API_SERVER: il percorso kubeconfig del server API globale. Per ulteriori
informazioni, vedi Server API globali e di zona.
Se non hai ancora generato un file kubeconfig per il server API, consulta la sezione
Accedi per maggiori dettagli.
DNS_ZONE_NAME: il nome della zona DNS.
PROJECT_NAMESPACE: lo spazio dei nomi del progetto.
DOMAIN_NAME: il nome di dominio per la tua zona DNS privata, ad esempio example.com.
DESCRIPTION: una descrizione della zona DNS.
Ad esempio, Private DNS zone for example.com. Questo campo è facoltativo.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[],[],null,["# Create DNS zones\n\n| **Preview:** This is a Preview feature that is available as-is and is not recommended for production environments. Google provides no Service-Level agreements (SLA) or technical support commitments for Preview features. For more information, see GDC's [feature stages](/distributed-cloud/hosted/docs/latest/gdch/resources/feature-stages).\n\nThis page guides you through how to configure DNS resolution for a new domain in Google Distributed Cloud (GDC) air-gapped.\nIn GDC through the use of DNS zones.\n\nThe intended audience for this page is platform administrators and application operators\nresponsible for managing DNS resolution for their organization.\n\nYou can create public or private DNS zones in your GDC environment to match the visibility and access requirements of your services:\n\n- **For services that require external network visibility and access:** Set up a public DNS zone to allow users and systems outside your network access to your service. If you have a website, a public-facing API, or any service that needs to be reachable from outside your GDC Cloud environment, you need a public DNS zone to map your domain name to the appropriate IP addresses.\n- **For services that require secure and restricted access to internal\n systems:** Set up a private DNS zone to hide your internal domain name and restrict access to your internal services. If you have an internal application, database, or microservice that needs to communicate with other internal services using only secure protocols and private IP addresses, you need a private DNS zone to map your domain name to the appropriate IP addresses A private DNS zone ensures that these services can find each other using internal domain names without exposing their existence or IP addresses to the external network. This enhances security and simplifies internal networking.\n\nFor more information about the difference between public and private DNS zones, see [Zone types for Cloud DNS](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/dns-overview#zone-types).\n\nBefore you begin\n----------------\n\nTo configure DNS zones in GDC and add records, you must\nhave the following:\n\n- An existing project. For more information, see [Create a\n project](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/create-a-project).\n- The necessary identity and access roles. For more information, see [Prepare IAM permissions](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/dns-permissions).\n\nCreate a public DNS zone\n------------------------\n\nUse the Kubernetes API in GDC to create a public DNS zone:\n\n1. Create and apply a `ManagedDNSZone` resource to create a DNS zone\n accessible from outside of GDC:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eGLOBAL_API_SERVER\u003c/var\u003e apply -f - \u003c\u003cEOF\n apiVersion: networking.global.gdc.goog/v1\n kind: ManagedDNSZone\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDNS_ZONE_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n dnsName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDOMAIN_NAME\u003c/span\u003e\u003c/var\u003e\n description: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDESCRIPTION\u003c/span\u003e\u003c/var\u003e\n visibility: PUBLIC\n EOF\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eGLOBAL_API_SERVER\u003c/var\u003e: the global API server's kubeconfig path. For more information, see [Global and zonal API servers](/distributed-cloud/hosted/docs/latest/gdch/resources/multi-zone/api-servers). If you have not yet generated a kubeconfig file for the API server, see [Sign in](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in) for details.\n - \u003cvar translate=\"no\"\u003eDNS_ZONE_NAME\u003c/var\u003e: the name of your DNS zone.\n - \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: the namespace of your project.\n - \u003cvar translate=\"no\"\u003eDOMAIN_NAME\u003c/var\u003e: the domain name for your public DNS zone, such as `example.com`.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for your DNS zone. For example, `Public DNS zone for example.com`. This field is optional.\n2. For a public DNS zone, you must configure the DNS resolver in your network to forward\n DNS requests for that DNS zone to the name servers in GDC that host that\n DNS zone. The name servers are listed in the status of a `ManagedDNSZone` custom resource:\n\n apiVersion: networking.global.gdc.goog/v1\n kind: ManagedDNSZone\n metadata:\n name: public-example-com\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n dnsName: example.com\n description: \"Public DNS zone for example.com\"\n visibility: PUBLIC\n status:\n ...\n nameServers:\n - ns.managed-dns-public.gdc1.staging.gpcdemolabs.com\n\n For this example, the DNS resolver needs to be updated to forward\n requests for `example.com` to\n `ns.managed-dns-public.gdc1.staging.gpcdemolabs.com`. This configuration assumes that the resolver already has the configuration needed to appropriately forward DNS requests for GDC's infrastructure DNS zone `gdc1.staging.gpcdemolabs.com`.\n\nCreate a private DNS zone\n-------------------------\n\nUse the Kubernetes API to create a private DNS zone:\n\n- Create and apply a `ManagedDNSZone` resource to create a DNS zone\n accessible only from within the default customer VPC:\n\n kubectl --kubeconfig \u003cvar translate=\"no\"\u003eGLOBAL_API_SERVER\u003c/var\u003e apply -f - \u003c\u003cEOF\n apiVersion: networking.global.gdc.goog/v1\n kind: ManagedDNSZone\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDNS_ZONE_NAME\u003c/span\u003e\u003c/var\u003e\n namespace: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003ePROJECT_NAMESPACE\u003c/span\u003e\u003c/var\u003e\n spec:\n dnsName: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDOMAIN_NAME\u003c/span\u003e\u003c/var\u003e\n description: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eDESCRIPTION\u003c/span\u003e\u003c/var\u003e\n visibility: PRIVATE\n EOF\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eGLOBAL_API_SERVER\u003c/var\u003e: the global API server's kubeconfig path. For more information, see [Global and zonal API servers](/distributed-cloud/hosted/docs/latest/gdch/resources/multi-zone/api-servers). If you have not yet generated a kubeconfig file for the API server, see [Sign in](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/iam/sign-in) for details.\n - \u003cvar translate=\"no\"\u003eDNS_ZONE_NAME\u003c/var\u003e: the name of your DNS zone.\n - \u003cvar translate=\"no\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: the namespace of your project.\n - \u003cvar translate=\"no\"\u003eDOMAIN_NAME\u003c/var\u003e: the domain name for your private DNS zone, such as `example.com`.\n - \u003cvar translate=\"no\"\u003eDESCRIPTION\u003c/var\u003e: a description for your DNS zone. For example, `Private DNS zone for example.com`. This field is optional.\n\nWhat's next\n-----------\n\n- [Create a DNS record](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/create-dns-records)"]]