Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run multiple plugins in a single instance of CoreDNS #81

Open
dcplaya opened this issue Mar 19, 2022 · 3 comments
Open

Run multiple plugins in a single instance of CoreDNS #81

dcplaya opened this issue Mar 19, 2022 · 3 comments

Comments

@dcplaya
Copy link

dcplaya commented Mar 19, 2022

I have 2 independent clusters, each with their own ingress. Both clusters have the same root domain name, but they are seperated by a sub domain.

Is it possible to run 2 plugins, with 2 different zones and a lookup will check (and fallthrough if needed) both clusters? I have the following in my Coredns config file but I only get NXDOMAIN returns from the cluster-1 URLs. The 2nd instance (home context) seems to work with no issues.

 k8s_gateway cluster-1.FQDN.com {
   ttl 30
   kubeconfig /config/kubeconfig cluster-1
   fallthrough
 }
  k8s_gateway FQDN.com {
    ttl 30
    kubeconfig /config/kubeconfig home
    fallthrough
  }
}
@networkop
Copy link
Collaborator

AFAIK, this is not possible but you can define multiple zones, e.g. k8s_gateway cluster-1.FQDN.com cluster-2.FQDN.com

@dcplaya
Copy link
Author

dcplaya commented Mar 19, 2022

AFAIK, this is not possible but you can define multiple zones, e.g. k8s_gateway cluster-1.FQDN.com cluster-2.FQDN.com

Both of those theoretical zones have different ingress IPs for all services and are located in different clusters (so different contexts in kubeconfig).

I'll figure some other way out. Its only temporary while I migrate things around anyway.

@networkop
Copy link
Collaborator

networkop commented Mar 20, 2022

ah, I see. So at this point, the plugin assumes there's a single source of information, i.e. a single k8s cluster to sync with.
However, what I had in the past is this:
https://networkop.co.uk/img/d14.png
I had an hierarchy of plugins. The top plugin would receive all queries and then would forward them to one of its child plugins, syncing state from different k8s clusters. If this may help, I can try and see if i still have those configs somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants