https://github.com/slok/external-dns-aws-migrator
Utility to adopt AWS route53 entries (record sets) so the external-dns can track and update them based on Kubernetes ingresses
https://github.com/slok/external-dns-aws-migrator
adopt aws dns external-dns infrastructure k8s kubernetes migration route53 tool
Last synced: 6 months ago
JSON representation
Utility to adopt AWS route53 entries (record sets) so the external-dns can track and update them based on Kubernetes ingresses
- Host: GitHub
- URL: https://github.com/slok/external-dns-aws-migrator
- Owner: slok
- License: apache-2.0
- Created: 2018-06-19T18:46:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-22T13:50:56.000Z (over 7 years ago)
- Last Synced: 2025-02-16T07:55:48.598Z (8 months ago)
- Topics: adopt, aws, dns, external-dns, infrastructure, k8s, kubernetes, migration, route53, tool
- Language: Go
- Size: 1.16 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
# external-dns-aws-migrator
Utility that helps migrating old (not managed by [external-dns][external-dns]) route53 resource record sets from a hosted zone to being managed by external-dns and let update based on the kubernetes ingress address (set by other ingress controllers)
## Motivation
Sometimes you add external-dns to your clusters and the new flow doesn't have your old host entries from route53 but you want these entries being tracked and managed by external-dns, to do this you would need to create a txt entry for each one, this tool helps doing this migration all at once, filtered by hosts, with multiple external-dns...
## When should I use this?
You are using Kubernetes, AWS, you already have dns entries in route53 (manually or managed by another tool) and you want to start using external-dns to automate ingress loadbalancer addresses in route53.
## Usage
external-dns-aws-migrator reads hosts from the stdin (one per line) and tries to adopt the entries so the external-dns starts managing the entries.
Example:
Get all ingress hosts from a cluster.
```bash
kubectl get ingress \
--all-namespaces \
-o jsonpath='{.items[*].spec.rules[*].host}' \
| sed "s/ /\n/g" > /tmp/ingresses.txt
```Now adopt in dry run mode(only print the ones that will be applied) all `slok.xyz` hosts with the external-dns instance identifier `slok-xyz`:
```bash
external-dns-aws-migrator \
-filter ".*\.slok\.xyz$" \
--txt-owner-id "slok-xyz" \
--dry-run < /tmp/ingresses.txt
```[external-dns]: https://github.com/kubernetes-incubator/external-dns