Delete DNS zones

This document guides you on how to delete a previously created public and private DNS zone in Google Distributed Cloud (GDC) air-gapped, when it is empty and no longer needed. The intended audience for this document is platform administrators and application operators responsible for managing DNS records within a project.

Before you begin

To delete DNS zones in GDC, you must have the following:

  • An existing DNS zone to delete. See List DNS zones for guidance on listing your current zones.
  • 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.

Delete a public or private DNS zone

Use the Kubernetes API in GDC to delete a public or private DNS zone:

kubectl --kubeconfig GLOBAL_API_SERVER \
delete manageddnszones.networking.global.gdc.goog/v1 DNS_ZONE_NAME \
-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.
  • DNS_ZONE_NAME: the name of your DNS zone which needs to be deleted.
  • PROJECT_NAMESPACE: the namespace of your project.