External-dns: No endpoints could be generated

Created on 1 Nov 2017  路  7Comments  路  Source: kubernetes-sigs/external-dns

I'm having a problem with generating endpoints on AWS.

I have Ingresses from traefik looking like below, but all I get from external-dns when debugging is on is No endpoints could be generated from ingress default/test-wordpress.

I'm running
external-dns 0.4.7
traefik 1.4.0

How do I continue debugging this issue?

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-wordpress
  annotations:
    kubernetes.io/ingress.class: traefik
spec:
  rules:
  - host: test.mydomain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: test-wordpress
          servicePort: 80
_____________________________

Most helpful comment

@keefbaker i have faced exactly the same issue as you with external-dns and traefik. Fortunately, i've been able to find a workaround in the codebase: You can add the external-dns.alpha.kubernetes.io/target annotation to your ingress to specify the loadbalancer's host or IP address.

eg:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-wordpress
  annotations:
    kubernetes.io/ingress.class: traefik
    external-dns.alpha.kubernetes.io/target: mytraefikservice.mydomain.com
spec:
  rules:
  - host: test.mydomain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: test-wordpress
          servicePort: 80

this worked for me. hopes this helps !

All 7 comments

@Jakst this question appeared in the slack channel a day ago, but I think it was not from you. I think the problem here is that traefik does not populate the loadbalancer field of the ingress, that's why external-dns does not find any records to be generated.

@ideahitme Ok. So you mean external-dns is not compatible with traefik?

@Jakst not out-of-the-box. What is missing from external-dns point of view is the target where created dns record should be pointing to. If traefik would populate the loadbalancer field of each used ingress with the IP address of the node where traefik is deployed then the whole setup would be working.

Is there any known work-round? Aside from adding the dns record as an extra annotation to the traefik instance?

@keefbaker i have faced exactly the same issue as you with external-dns and traefik. Fortunately, i've been able to find a workaround in the codebase: You can add the external-dns.alpha.kubernetes.io/target annotation to your ingress to specify the loadbalancer's host or IP address.

eg:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-wordpress
  annotations:
    kubernetes.io/ingress.class: traefik
    external-dns.alpha.kubernetes.io/target: mytraefikservice.mydomain.com
spec:
  rules:
  - host: test.mydomain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: test-wordpress
          servicePort: 80

this worked for me. hopes this helps !

had I searched better, i would've found this in the FAQ

Closing this issue as hopefully the FAQ entry is good enough (feel free to propose documentation improvements).

Was this page helpful?
0 / 5 - 0 ratings