-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:fsicardir/ddns_cloudflare
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)` |