External DNS skips records (No matching hosted zone was detected)

6/13/2019

I created External DNS on my cluster (provided by DigitalOcean) with the following values for stable/external-dns Helm chart:

provider: digitalocean
digitalocean:
  apiToken: "MY_DIGITAL_OCEAN_TOKEN"
domainFilters:
  - example.com
rbac:
  create: true
logLevel: debug

It used to be fine, but recently it stopped creating records due to no hosted zone matching record DNS Name was detected:

time="2019-06-10T14:42:55Z" level=debug msg="Endpoints generated from ingress: deepfork/df-stats-site: [fork.example.com 0 IN A 134.***.***.197 [] fork.example.com 0 IN A 134.***.***.197 []]"
time="2019-06-10T14:42:55Z" level=debug msg="Removing duplicate endpoint fork.example.com 0 IN A 134.***.***.197 []"
time="2019-06-10T14:42:56Z" level=debug msg="Skipping record fork.example.com because no hosted zone matching record DNS Name was detected "
time="2019-06-10T14:42:56Z" level=debug msg="Skipping record fork.example.com because no hosted zone matching record DNS Name was detected "
-- stasdeep
digital-ocean
dns
kubernetes
kubernetes-helm

2 Answers

6/18/2019

This error message comes from kubernetes-incubator/external-dns provider/digital_ocean.go#digitalOceanChangesByZone(), a project for which you have opened an issue (1064)

Check if this is not related to issue 1055 which has a similar issue, when using images with "latest" tag.

Recent commits might address this problem:

  • commit dc5099d which refers to issue 1056, which mentioned "Having traced this the issue appears to be that the exclude-domains has a default value of "". that leads to always matching the exclude"
  • commit 6f543ec which solves issue 1057: "Google DNS zones not found with filter"
-- VonC
Source: StackOverflow

6/18/2019

It got resolved when I manually added the record with DigitalOcean web interface. After that, ExternalDNS started ignoring adding new records because of the fact it was already there.

time="2019-06-18T11:09:55Z" level=debug msg="Removing duplicate endpoint fork.example.com 0 IN A 134.***.***.197 []"

Later I removed the records with the interface, and ExternalDNS it started working.

time="2019-06-18T11:10:56Z" level=info msg="Changing record." action=CREATE record=fork.example.com ttl=300 type=A zone=example.com
time="2019-06-18T11:10:56Z" level=info msg="Changing record." action=CREATE record=fork.example.com ttl=300 type=TXT zone=example.com
-- stasdeep
Source: StackOverflow