-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Support Traefik ingress controller #413
Comments
Yes, ideally the ingress controller updates the |
@hjacobs thanks, we've started using that annotation for now. I checked the status of our ingresses and it seems Traefik is not updating them so perhaps I should move this issue to the Traefik repo. I couldn't find much in the way of kube docs around updating the status of an Ingress. |
@c-knowles did you manage to get this working? |
@caarlos0 yeah, the instructions above work ok:
The key to getting it to work on Route 53 at least was #2. From what I remember external-dns attempts to batch the DNS updates so if #1 is not in place first then the batch contains #1 and #3 which fails and it will never complete. |
Any chance we can get these three steps added to the documentation as a side-note when using Traefik? I'm using Helm to deploy Traefik and added this to my service:
annotations:
external-dns.alpha.kubernetes.io/hostname: ingress.example.com |
For others that find this, Traefik 1.7 now supports setting the required status fields. You'll have to set one of the
See https://docs.traefik.io/v1.7/configuration/backends/kubernetes/#ingressendpoint for more details. |
@coderanger i don't understand, does this mean that traefik 1.7 support external-dns? Thanks. |
Yes, with that setting turned on Traefik 1.7 supports external-dns. |
@coderanger thanks for fast answer. what does this setting do? |
The ingress controller (traefik) needs to know what address to publish into DNS. You can either set a fixed IP or hostname, or set a service to copy the information from. The latter is the more common case, so that's setting the service to copy from to one named |
Are you use you're using 1.7? You don't need to change it every time you make a new Ingress, as your example shows the status publish uses the Service (usually a LoadBalancer service) in front of the Traefik pods themselves. First check that the Service has a hostname or IP in its status:
Then check that Traefik is correctly copying that to the status of the Ingress:
The thing external-dns actually cares about is that Status field in the Ingress (or Service if publishing those) so if it's set, you should be golden. |
FYI for anyone using helm you just need to set the following:
https://github.com/helm/charts/blob/master/stable/traefik/values.yaml#L51 |
@c-knowles @hjacobs I'd consider this issue closed, I guess maybe worth updating documentation but its definitely supported and very easy to get working |
@bradenwright let's have 1-2 sentences about it in the FAQ. I guess a new bullet item here makes sense: "Traefik is supported when setting the XYZ flag" |
How about this:
|
PR welcome 😄 |
I can confirm this is working with the latest chart for Traefik and the above settings, we upgraded to that a couple of weeks ago and it's now setting the Ingress statuses which then gets picked up by external-dns automatically. |
How do you guys configure traefik to make this config work? I am not using helm so I created a configmap containing the following: |
@mostrovoi Explaining how to configure Traefik in general is out of scope for this ticket. Please ask on one of the various Slack channels or other support systems for Traefik. |
* pkg/index: ignore non-.yaml files during scanning Turns out if there was a file in index/ directory with a non-.yaml extension, we still targeted that as a plugin, so we tried to parse its manifest. (But read/parsing of individual manifests do not cause fatal errors, just printed to stderr like a warning.) This creates a helper method that properly scans for .yaml files in an immediate directory. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com> * rename variables Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
I'd like to support Traefik as the ingress controller. Could someone point me in the right direction? I found the following code which seems to indicate Traefik would need to be updating the ingress status. Is there more to it than that?
https://github.com/kubernetes-incubator/external-dns/blob/b23765ed2722c5b39961eb6cf51d094c2db02d6b/source/ingress.go#L221
The text was updated successfully, but these errors were encountered: