gcloud dns managed-zones create ZONE_NAME --dns-name=DNS_NAME [--denial-of-existence=DENIAL_OF_EXISTENCE] [--description=DESCRIPTION] [--dnssec-state=DNSSEC_STATE] [--forwarding-targets=[IP_ADDRESSES,…]] [--gkeclusters=[GKECLUSTERS,…]] [--ksk-algorithm=KSK_ALGORITHM] [--ksk-key-length=KSK_KEY_LENGTH] [--labels=[KEY=VALUE,…]] [--location=LOCATION] [--[no-]log-dns-queries] [--managed-reverse-lookup] [--networks=[NETWORK,…]] [--private-forwarding-targets=[IP_ADDRESSES,…]] [--service-directory-namespace=SERVICE_DIRECTORY_NAMESPACE] [--visibility=VISIBILITY; default="public"] [--zsk-algorithm=ZSK_ALGORITHM] [--zsk-key-length=ZSK_KEY_LENGTH] [--target-network=TARGET_NETWORK --target-project=TARGET_PROJECT] [GCLOUD_WIDE_FLAG …]
gcloud dns managed-zones create my-zone --dns-name=my.zone.com. --description="My zone!"To create a managed-zone with DNSSEC, run:
gcloud dns managed-zones create my-zone-2 --description="Signed Zone" --dns-name=myzone.example --dnssec-state=onTo create a zonal managed-zone scoped to a GKE Cluster in us-east1-a, run:
gcloud dns managed-zones create my-zonal-zone --description="Signed Zone" --dns-name=cluster.local --visibility=private --gkeclusters=cluster1 --location=us-east1-aZONE_NAME--dns-name=DNS_NAME--denial-of-existence=DENIAL_OF_EXISTENCEDENIAL_OF_EXISTENCE must be one
of: nsec, nsec3.
--description=DESCRIPTION--dnssec-state=DNSSEC_STATEDNSSEC_STATE
must be one of:
offontransfer--forwarding-targets=[IP_ADDRESSES,…]public visibility.
Non-RFC1918 addresses will forward to the target through the Internet. RFC1918
addresses will forward through the VPC.
--gkeclusters=[GKECLUSTERS,…]--ksk-algorithm=KSK_ALGORITHMKSK_ALGORITHM must be one of:
ecdsap256sha256, ecdsap384sha384,
rsasha1, rsasha256, rsasha512.
--ksk-key-length=KSK_KEY_LENGTH--labels=[KEY=VALUE,…]-), underscores (_), lowercase characters, and
numbers. Values must contain only hyphens (-), underscores
(_), lowercase characters, and numbers.
--location=LOCATION--[no-]log-dns-queries--log-dns-queries to enable and --no-log-dns-queries
to disable.
--managed-reverse-lookup--networks=[NETWORK,…]--private-forwarding-targets=[IP_ADDRESSES,…]public visibility.
All addresses specified for this parameter will be reached through the VPC.
--service-directory-namespace=SERVICE_DIRECTORY_NAMESPACEpublic visibility zones.
--visibility=VISIBILITY; default="public"--networks flag. VISIBILITY must be one of:
public, private.
--zsk-algorithm=ZSK_ALGORITHMZSK_ALGORITHM must be one of:
ecdsap256sha256, ecdsap384sha384,
rsasha1, rsasha256, rsasha512.
--zsk-key-length=ZSK_KEY_LENGTH--target-network=TARGET_NETWORK--target-project=TARGET_PROJECT--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha dns managed-zones creategcloud beta dns managed-zones create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.