A simple dynamic DNS service for Route53
1M+
A simple dynamic DNS service for Route53.
| :warning: WARNING |
|---|
| Version 4 and newer no longer keeps the container running with a sleep script. You should either run on a schedule via cron or as a Kubernetes CronJob. If you want to continue using this the old way, use the :3 or 3.0.1 tag (no longer maintained). |
| Architecture | Supported |
|---|---|
linux/amd64 | Yes |
linux/arm64 | Yes |
linux/arm/v7 | No |
:warning: arm/v7 (32-bit ARM) support was dropped after v4.0.0 due to incompatibility with the uv package manager.
Use arm64 for modern ARM devices (Raspberry Pi 4 and later).
If you need arm/v7, use the :4 or :4.0.0 tag (no longer maintained).
Create a secret containing multiple key-value pairs to store your AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
kubectl create secret generic aws-secret --from-literal=AWS_ACCESS_KEY_ID='my_access_-_key_id' --from-literal=AWS_SECRET_ACCESS_KEY='my_secret_access_key'
Run every 5 minutes for the domain example.com, using the values from the secret created above.
Make sure to set the record to update in the args section.
apiVersion: batch/v1
kind: CronJob
metadata:
name: route53-dyndns-cron
spec:
schedule: "*/5 * * * * "
jobTemplate:
spec:
ttlSecondsAfterFinished: 100
template:
spec:
containers:
- image: docker.io/bshaw/route53-dyndns
name: route53-dyndns
imagePullPolicy: Always
envFrom:
- secretRef:
name: route53-dyndns-secret
args:
- --record
- example.com
- --verbose
restartPolicy: OnFailure
Run once for the domain example.com.
Make sure to set values for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and the record to update.
docker run \
--rm \
--name route53 \
-e AWS_ACCESS_KEY_ID= \
-e AWS_SECRET_ACCESS_KEY= \
bshaw/route53-dyndns \
--record example.com --verbose
Add to your crontab / scheduler.
Run every 5 minutes for the domain example.com.
Make sure to set values for AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and the record to update.
*/5 * * * * docker run --rm --name route53 -e AWS_ACCESS_KEY_ID="access_key_id" -e AWS_SECRET_ACCESS_KEY="secret_access_key" bshaw/route53-dyndns --record example.com --verbose
python3 r53dyndns.py --help
usage: r53dyndns.py [-h] -r RECORD [-v]
Update a Route53 A record with the current external IP address.
options:
-h, --help show this help message and exit
-r, --record RECORD specify the DNS A record to update
-v, --verbose enable verbose output
AWS_ACCESS_KEY_ID - An AWS Access KeyAWS_SECRET_ACCESS_KEY - An AWS Secret KeyBoto supports multiple ways to supply credentials.
See the official documentation for more details: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.htm
This service performs a DNS query to retrieve your IP address from an OpenDNS resolver. This method arguably faster and more reliable than using an http(s) service.
Similar functionality could be done via the shell using dig: dig +short myip.opendns.com @resolver1.opendns.com;
Content type
Image
Digest
sha256:cb39cda19…
Size
57.1 MB
Last updated
4 days ago
docker pull bshaw/route53-dyndns:5