COREDNS-CLOUDDNS(7)
π clouddns β COREDNS-CLOUDDNS(7) π
okay bestie, so this is a page from the CoreDNS Plugins manual set β like, the whole COREDNS-CLOUDDNS(7) situation β and no cap, it's lowkey one of the cutest little plugins to explain. buckle up π
β¨ NAME β¨
clouddns β enables serving zone data from GCP Cloud DNS. that's it, that's the vibe π
π DESCRIPTION π
so the clouddns plugin is genuinely iconic for serving zones straight from resource record sets in GCP Cloud DNS. and the way it supports all Google Cloud DNS records β¨https://cloud.google.com/dns/docs/overview#supported_dns_record_typesβ©? obsessed. every single record type, we love to see it π«Ά
here's the tea though: you can use this plugin whenever CoreDNS is deployed on GCP or literally anywhere else. it's giving main character energy in any environment β¨
just know that this plugin accesses the resource records through the Google Cloud API. that's the whole route, iykyk.
and for records in a privately hosted zone? bestie, you do not need to place CoreDNS and this plugin in the associated VPC network. nope. in fact β the private hosted zone could be created without any associated VPC at all, and this plugin could still access the resource records under the hosted zone. slay πβ¨
π¦ SYNTAX π¦
clouddns [ZONE:PROJECT_ID:HOSTED_ZONE_NAME...] {
credentials [FILENAME]
fallthrough [ZONES...]
}
- πΈ
ZONEβ the name of the domain to be accessed. and here's the important bit: when there are multiple zones with overlapping domains (private vs. public hosted zone), CoreDNS does the lookup in the order you list them here. so for a non-existing resource record, the SOA response will come from the rightmost zone. order matters, periodt. - πΈ
PROJECT_IDβ the project ID of the Google Cloud project. - πΈ
HOSTED_ZONE_NAMEβ the name of the hosted zone that contains the resource record sets to be accessed. - πΈ
credentialsβ used for reading the credential file fromFILENAME(normally a.jsonfile). this field is optional. if you don't provide it, authentication will be done automatically, e.g., through the environmental variableGOOGLE_APPLICATION_CREDENTIALS. π«§
β οΈ okay, real talk moment: CoreDNS validates that the given file has a valid credentials type, but it does not validate the credentials file for malicious input. so keep your eyes on that file, bestie. π please see Google Cloud's authentication method β¨https://cloud.google.com/docs/authenticationβ© and validating credential configurations from external sources β¨https://docs.cloud.google.com/docs/authentication/client-libraries#external-credentialsβ© for more details.
- πΈ
fallthroughβ if the zone matches and no record can be generated, pass the request to the next plugin. if[ZONES...]is omitted, then fallthrough happens for all zones for which the plugin is authoritative. if specific zones are listed (for examplein-addr.arpaandip6.arpa), then only queries for those zones will be subject to fallthrough. the way that works is honestly so clean β¨
π EXAMPLES π
π enableclouddnswith implicit GCP credentials and resolve CNAMEs via10.0.0.1:
example.org {
clouddns example.org.:gcp-example-project:example-zone
forward . 10.0.0.1
}
π enable clouddns with fallthrough:
example.org {
clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:example-zone-2 {
fallthrough example.gov.
}
}
π enable clouddns with multiple hosted zones with the same domain:
. {
clouddns example.org.:gcp-example-project:example-zone example.com.:gcp-example-project:other-example-zone
}
π and that's the whole page, bestie! this one's from the CoreDNS manual, March 2026 edition β COREDNS-CLOUDDNS(7), no cap. go forth and serve those zones πβ¨π
π¦ where this page comes from
- nixpkgs unstable: coredns 1.14.7
- opensuse-leap 16.0: coredns-extras 1.15.0-bp160.1.1 Β· Apache-2.0 AND MPL-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms