I am hitting an issue where I could use some help. I have 2 single-node K8s clusters, each running external-dns, and a VM running PowerDNS. The external-dns is installed with different txtOwnerId
in each cluster like this:
helm install --set provider=pdns --set pdns.apiUrl=http://<pdns-ip> --set pdns.apiKey=demo --set txtOwnerId=cluster1 --set logLevel=debug --set interval=5s --set policy=sync external-dns ./
When I bring up an application -- a NodePort service (backed by a Deployment) -- in one of the clusters, with external-dns annotation, I see that its DNS record gets updated in PowerDNS.
My real goal is to arrange for that application to be migrated to the other cluster, i.e., bring up the Deployment and NodePort service in the other cluster and, whenever it is Ready, terminate the app in the first cluster. For this to work, the external-dns in the 2nd cluster must update the DNS record with the new IP address.
However, when the application comes up in the 2nd cluster, the DNS entry does not get updated though I see that exter-dns is sending a REPLACE request with rrsets containing the right A record and TXT record. Only when the application in cluster 1 is kiiled, the DNS entry of cluster 2 gets applied. This is not my desired behavior -- I'd like the new app's entry to take over ASAP so that client traffic can be diverted to it, and then the old app can be killed.
Is there any PowerDNS setting or external-dns setting to enable this?