This document guides you on how to update previously created DNS records in Google Distributed Cloud (GDC) air-gapped.
Before you begin
To update DNS records in GDC, you must have the following:
- An existing public or private DNS zone with DNS records.
- The necessary identity and access roles. To manage DNS records for your
project, ask your Project IAM Admin to grant you the
Managed DNS Project Admin (
managed-dns-project-admin) role. - A kubeconfig file for the global API server. If you have not yet generated this file, see Sign in. For more information, see Global and zonal API servers.
Update a DNS record
Use the Kubernetes API in GDC to update a DNS record:
kubectl --kubeconfig GLOBAL_API_SERVER apply -f - <<EOF
apiVersion: networking.global.gdc.goog/v1
kind: ResourceRecordSet
metadata:
name: RESOURCE_RECORD_NAME
namespace: PROJECT_NAMESPACE
spec:
name: RESOURCE_RECORD_FQDN
ttlSeconds: TIME_TO_LIVE
type: RR_TYPE
rrData:
- RECORD_DATA
dnsZone: DNS_ZONE_NAME
EOF
Replace the following:
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: the DNS record to update, such astest.system.example.com.RESOURCE_RECORD_FQDN: the fully qualified domain name (FQDN) for the record, such asanother.ai.system.example.com.TIME_TO_LIVE: the updated time to live (TTL) for this record, in seconds, which specifies how long DNS resolvers can cache this record before querying for it again. This field is optional. The default value is300.RR_TYPE: the type of thisResourceRecordSet. The options are:A,CNAME,TXT,PTR, andMX.RECORD_DATA: the updated data for all resource records in the RRset. Each entry represents a separate resource record. Here are some examples depending on the record type:Arecord: the IP address thisArecord points to:type: A rrData: - 10.6.7.8CNAMErecord: the target domain name for thisCNAMErecord:type: CNAME rrData: - "ai.system.example.com"TXTrecord: the text data for thisTXTrecord:type: TXT rrData: - "Example text"PTRrecord: the domain name thisPTRrecord points to, for reverse DNS lookup of an IP address:type: PTR rrData: - "8.7.6.10.in-addr.arpa."MXrecord: the priority and the hostname of the mail server:type: MX rrData: - "10 mail.example.com."
DNS_ZONE_NAME: the name of theManagedDNSZonecustom resource where this record is added. For more information, see Create DNS zones.