List DNS records

This document guides you on how to list DNS records in a DNS zone in Google Distributed Cloud (GDC) air-gapped.

Before you begin

To list DNS records in GDC, you must have the following:

  • The necessary identity and access roles. To list DNS records for your project, ask your Project IAM Admin to grant you the Managed DNS Project Viewer (managed-dns-project-viewer) 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.

List DNS records

Use the Kubernetes API in GDC to list DNS records.

To list a single record, run the following command:

kubectl --kubeconfig GLOBAL_API_SERVER get resourcerecordset.networking.global.gdc.goog RESOURCE_RECORD_NAME -n PROJECT_NAMESPACE

To list all DNS Records under a project, run the following command:

kubectl --kubeconfig GLOBAL_API_SERVER get resourcerecordset.networking.global.gdc.goog -n PROJECT_NAMESPACE

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.
  • RESOURCE_RECORD_NAME: the DNS record to be listed such as cname.system.example.com.
  • PROJECT_NAMESPACE: the namespace of your project.