Stay organized with collections
Save and categorize content based on your preferences.
This page guides you through how to create DNS records in Google Distributed Cloud (GDC) air-gapped. Create new DNS entries to map domain names to resources.
The intended audience for this page is platform administrators and application operators
responsible for managing DNS records within a project.
After you have created your DNS zone, you can create different types of DNS
records to point your domain names and subdomains to your services. Create the following DNS record types:
Address (A) record: maps a domain name to one or more IPv4
addresses. This record is the most fundamental record type for pointing a
domain to a server.
Canonical Name (CNAME) record: creates an alias of one domain name
to another canonical (authoritative) domain name. This record type is
useful for redirecting traffic or simplifying DNS management.
Text (TXT) record: lets you associate arbitrary text with a domain
name. These records are often used for verification purposes or to store
information like Sender Policy Framework (SPF) records for email authentication.
Pointer (PTR) record: maps an IP address back to a domain name, also
known as reverse DNS lookup. This record is often used for email server
reputation and logging analysis.
Mail Exchanger (MX) record: specifies the mail servers responsible
for accepting email for a domain. This is essential for setting up email
services.
Before you begin
To create DNS records in GDC, you must have the following:
An existing public or private DNS zone. For more information, see
Create DNS zones.
GLOBAL_API_SERVER: the global API server's kubeconfig path. For more
information, see
Global and zonal API servers.
If you have not yet generated a kubeconfig file for the API server, see
Sign in for details.
PROJECT_NAMESPACE: the namespace of your project.
RESOURCE_RECORD_NAME: your chosen unique name for this
ResourceRecordSetresource within the namespace, such as
cname.system.example.com
RESOURCE_RECORD_FQDN: the fully qualified domain name (FQDN) for the
record, such as another.ai.system.example.com.
TIME_TO_LIVE: the time to live (TTL) in seconds for this record. This
field is optional. The default value is 300.
RR_TYPE:the type of this ResourceRecordSet. The options are: A,
CNAME, TXT, PTR, and MX
RECORD_DATA: the data for all resource records in the RRset. Each
entry represents a separate resource record. Here are some examples
depending on the record type:
A record: the IP address this A record points to:
type:ArrData:-10.6.7.8
CNAME record: the target domain name for this CNAME record:
type:CNAMErrData:-"ai.system.example.com"
TXT record: the text data for this TXT record:
type:TXTrrData:-"Exampletext"
PTR record: the domain name this PTR record points to, for reverse DNS lookup of an IP address:
type:PTRrrData:-"8.7.6.10.in-addr.arpa."
MX record: the priority and the hostname of the mail server:
type:MXrrData:-"10mail.example.com."
DNS_ZONE_NAME: the name of the ManagedDNSZone custom resource
where this record is added. For more information, see Create DNS
zones.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Create DNS records\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 create DNS records in Google Distributed Cloud (GDC) air-gapped. Create new DNS entries to map domain names to resources.\n\nThe intended audience for this page is platform administrators and application operators\nresponsible for managing DNS records within a project.\n\nAfter you have created your [DNS zone](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/create-dns-zone), you can create different types of DNS\nrecords to point your domain names and subdomains to your services. Create the following DNS record types:\n\n- **Address (A) record:** maps a domain name to one or more IPv4 addresses. This record is the most fundamental record type for pointing a domain to a server.\n- **Canonical Name (CNAME) record:** creates an alias of one domain name to another canonical (authoritative) domain name. This record type is useful for redirecting traffic or simplifying DNS management.\n- **Text (TXT) record:** lets you associate arbitrary text with a domain name. These records are often used for verification purposes or to store information like Sender Policy Framework (SPF) records for email authentication.\n- **Pointer (PTR) record:** maps an IP address back to a domain name, also known as reverse DNS lookup. This record is often used for email server reputation and logging analysis.\n- **Mail Exchanger (MX) record:** specifies the mail servers responsible for accepting email for a domain. This is essential for setting up email services.\n\nBefore you begin\n----------------\n\nTo create DNS records in GDC, you must have the following:\n\n- An existing public or private DNS zone. For more information, see [Create DNS zones](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/create-dns-zone).\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 DNS record\n-------------------\n\n- Create and apply a `ResourceRecordSet` resource to create a DNS record within an existing managed DNS zone:\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: ResourceRecordSet\n metadata:\n name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRESOURCE_RECORD_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 name: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRESOURCE_RECORD_FQDN\u003c/span\u003e\u003c/var\u003e\n ttlSeconds: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eTIME_TO_LIVE\u003c/span\u003e\u003c/var\u003e\n type: \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRR_TYPE\u003c/span\u003e\u003c/var\u003e\n rrData:\n - \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-l devsite-syntax-l-Scalar devsite-syntax-l-Scalar-Plain\"\u003eRECORD_DATA\u003c/span\u003e\u003c/var\u003e\n dnsZone: \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 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\"\u003ePROJECT_NAMESPACE\u003c/var\u003e: the namespace of your project.\n - \u003cvar translate=\"no\"\u003eRESOURCE_RECORD_NAME\u003c/var\u003e: your chosen unique name for this `ResourceRecordSet`resource within the namespace, such as `cname.system.example.com`\n - \u003cvar translate=\"no\"\u003eRESOURCE_RECORD_FQDN\u003c/var\u003e: the fully qualified domain name (FQDN) for the record, such as `another.ai.system.example.com`.\n - \u003cvar translate=\"no\"\u003eTIME_TO_LIVE\u003c/var\u003e: the time to live (TTL) in seconds for this record. This field is optional. The default value is `300`.\n - \u003cvar translate=\"no\"\u003eRR_TYPE\u003c/var\u003e`:`the type of this `ResourceRecordSet`. The options are: `A`, `CNAME`, `TXT`, `PTR`, and `MX`\n - \u003cvar translate=\"no\"\u003eRECORD_DATA\u003c/var\u003e: the data for all resource records in the RRset. Each\n entry represents a separate resource record. Here are some examples\n depending on the record type:\n\n - `A` record: the IP address this `A` record points to:\n\n type: A\n rrData:\n - 10.6.7.8\n\n - `CNAME` record: the target domain name for this `CNAME` record:\n\n type: CNAME\n rrData:\n - \"ai.system.example.com\"\n\n - `TXT` record: the text data for this `TXT` record:\n\n type: TXT\n rrData:\n - \"Example text\"\n\n - `PTR` record: the domain name this `PTR` record points to, for reverse DNS lookup of an IP address:\n\n type: PTR\n rrData:\n - \"8.7.6.10.in-addr.arpa.\"\n\n - `MX` record: the priority and the hostname of the mail server:\n\n type: MX\n rrData:\n - \"10 mail.example.com.\"\n\n - \u003cvar translate=\"no\"\u003eDNS_ZONE_NAME\u003c/var\u003e: the name of the `ManagedDNSZone` custom resource\n where this record is added. For more information, see [Create DNS\n zones](/distributed-cloud/hosted/docs/latest/gdch/platform/pa-user/dns/create-dns-zone)."]]