external-dns
external-dns copied to clipboard
AWS Route53 and headless service: extra root domain record is created
What happened:
According to the document: https://github.com/kubernetes-sigs/external-dns/blob/master/docs/tutorials/hostport.md
if we use example.org as root domain in Annotation, 3 dns records of the subdomains will be created:
kafka-0.example.org
kafka-1.example.org
kafka-2.example.org

While using AWS Route53 and headless service, I noticed an extra dns record of the root domain was created.
For example, using test.example.org as root domain in Annotation will create the following records:
test.example.org
kafka-0.test.example.org
kafka-1.test.example.org
kafka-2.test.example.org
What you expected to happen:
Is there is any reason for creating test.example.org record? Or is there any way to avoid creating this record?
How to reproduce it (as minimally and precisely as possible): Yaml for service:
apiVersion: v1
kind: Service
metadata:
annotations:
external-dns.alpha.kubernetes.io/hostname: test.example.org
route53: "true"
name: test-service
namespace: test
spec:
clusterIP: None
ports:
- name: http
port: 9000
protocol: TCP
targetPort: 9000
selector:
release: test-service
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
Anything else we need to know?:
Environment:
- External-DNS version (use
external-dns --version): V0.12.0 - DNS provider: AWS Route53
- Others: arguments for external-dns:
--annotation-filter=route53=true
--source=service
--source=ingress
--domain-filter=example.org
--provider=aws
--aws-prefer-cname
--registry=txt
--txt-prefix=_
--txt-owner-id=cluster-sy-external-dns
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs 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 or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR 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 and PRs.
This bot triages issues and PRs 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 or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR 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/test-infra repository.
Still an issue, and leads to a greater issue.
Having one or multiple headless services that target pods on the same node will break external dns, since duplicate records are in the request to route53 for the root dns.
External dns goes into an infinite crash loop.
Example logs from cloudtrail where two of the pods are on the same node:
{"action":"UPSERT","resourceRecordSet":{"name":"example.com","type":"A","tTL":300,"resourceRecords":[{"value":"10.5.25.120"},{"value":"10.5.25.253"},{"value":"10.5.31.11"},{"value":"10.5.31.11"}]}}
/remove-lifecycle rotten
/reopen
@ItielOlenick: You can't reopen an issue/PR unless you authored it or you are a collaborator.
In response to this:
/reopen
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/test-infra repository.