Skip to content

Commit

Permalink
Merge branch 'master' of github.com:fsicardir/ddns_cloudflare
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Sicardi committed Jan 17, 2019
2 parents 243c31f + 6c0f814 commit 198f418
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ddns_cloudflare
Shell script that updates cloudflare's DNS record to match your public IP. All in a Docker container and ready to deploy in kubernetes.

Credits to [steasdal](https://github.com/steasdal/ddclient-alpine) for most of the yaml configuration files.
Docker image available in [Docker Hub](https://cloud.docker.com/repository/docker/fsicardir/ddns_cloudflare).


### Deploy in kubernetes cluster:
- Change the fields in _cloudflare-secret.yaml_ to match your own data. Remember it must be encoded in base64 (`echo -n yourRawDataString | base64`).
- Create the secret: `kubect apply -f ./cloudflare-secret.yaml`.
- We don't want to update the DNS record if it hasn't changed, so we need to save the IP address after we update it. In order to do this, you need to persist it somehow.
An NFS server running in one of the nodes seems to be the easier approach. You will need to change the _path_ and _server_ fields in _ddns-persistent-volume.yaml_.
- Then we create the persistent volume: `kubect apply -f ./ddns-persistent-volume.yaml`.
- Finally, we deploy our application: `kubectl apply -f ./ddns-cloudflare-deployment.yaml`, and that's it!.
- Run `kubectl get all -l 'app=ddns'` and check if all is ready.
- You can see the logs with `kubectl logs $(kubectl get deployments -l 'app=ddns' -o name)`

0 comments on commit 198f418

Please sign in to comment.