external-dns
external-dns copied to clipboard
Target detection with NodePort ingress
What happened: When an ingress controller is running with a NodePort service instead of LoadBalancer, external-dns tries to create the dns entry with the cluster internal IP from the ingress service.
I think this happens because external-dns reads the IP only from the ingress object directly: https://github.com/kubernetes-sigs/external-dns/blob/a68da28241558b5c2d84db5757c2587238508f14/source/ingress.go#L293-L306
I figured out that this can be overwritten by the external-dns.alpha.kubernetes.io/target annotation. However I would have add this annotation to every ingress definition and manually update them every time a cluster node changes. I don't think this is very dynamic and can't be handled on the long run.
What you expected to happen:
External-dns should be smart enough to detect that the ingress is running without LoadBalancer or have an option to specify that. The DNS entries from such an ingress should contain either the public or private IPs of the cluster nodes. (depending on the external-dns.alpha.kubernetes.io/access annotation).
When the IP of a cluster node changes, or the cluster get more/less nodes, external-dns should also update the dns records accordingly.
How to reproduce it (as minimally and precisely as possible):
- deploy nginx-ingress with service type
NodePort - create an ingress
- Watch how external-dns creates an entry with the cluster internal IP
Anything else we need to know?: Maybe you could add an extra annotation, to tell external-dns, that it should extract the targets from the ingresses service definition instead from the ingress itself.
Environment:
- External-DNS version (use
external-dns --version): v0.13.1 - DNS provider: rfc2136
/assign
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
Even without the annotation for ingress resources, the current implementation differs from the default behaviour described in the FAQ:
If this annotation is not set, and the node has both public and private IP addresses, then the public IP will be used by default.
Current implementation sets both the external and internal addresses of the ingress controller on the DNS record.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle stale - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue as fresh with
/remove-lifecycle rotten - Close this issue with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.