kubernetes/docker job to update godaddy IPs for DNS entries, as a free alternative for DyDNS+co
2.4K
https://github.com/JustinGuese/kubernetes-job-godaddy-dns-update
Docker / Kubernetes tool to update the IP on godaddy if the router changes IP adresses.
"Open Source" variant for DyDNS, no-ip and others.
Runs a kubernetes job every hour and updates the ip using a kubernetes cronjob
add your domain/subdomains in the kubernetes/domain-dns-check-cronjob.yaml file and create a secret containing your godaddy api keys (see next step). then apply the cronjob to your cluster with:
kubectl apply -f kubernetes/domain-dns-check-cronjob.yaml
for docker just copy paste the .env-example and rename it to .env
for kubernetes create a secret with:
kubectl create secret generic godaddy --from-literal=GODADDY_PUBLIC_KEY=2312123123 --from-literal=GODADDY_SECRET=123213123
version: "3"
services:
godaddyupdater:
build: .
image: guestros/docker-godaddy-dns-updater:latest
# restart: never
env_file:
- .env
environment:
- "GODADDY_SUBDOMAINS=covidapp-api,covidapp-obj,nextcloud"
- "GODADDY_MAINDOMAIN=datafortress.cloud"
volumes:
- godaddyupdater:/app/persistent/
volumes:
godaddyupdater:
apiVersion: batch/v1
kind: CronJob
metadata:
name: domain-dns-check-godaddy
spec:
schedule: "0 * * * *" # every hour
jobTemplate:
spec:
template:
spec:
containers:
- name: domain-dns-check-godaddy
image: guestros/docker-godaddy-dns-updater:latest
imagePullPolicy: IfNotPresent
env:
- name: GODADDY_MAINDOMAIN
value: datafortress.cloud # enter your main domain here
- name: GODADDY_SUBDOMAINS
value: covidapp-api,covidapp-obj,nextcloud # enter the subdomains you plan on updating here
- name: GODADDY_PUBLIC_KEY
valueFrom:
secretKeyRef:
name: godaddy
key: GODADDY_PUBLIC_KEY
- name: GODADDY_SECRET
valueFrom:
secretKeyRef:
name: godaddy
key: GODADDY_SECRET
restartPolicy: OnFailure
volumes:
- name: domain-dns-check-godaddy-volume
persistentVolumeClaim:
claimName: domain-dns-check-godaddy-volume-claim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: domain-dns-check-godaddy-volume-claim
name: domain-dns-check-godaddy-volume-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Mi
status: {}
Content type
Image
Digest
sha256:050452e54…
Size
27.3 MB
Last updated
about 4 years ago
docker pull guestros/docker-godaddy-dns-updater