Continuing from yesterday, I now have a Docker container that will monitor for external IP address changes and update a domain name to point to the IP. A screenshot of it in action is below. I can’t explain the errors that appear but this only seems to happen when toggling a VPN connection on/off to force an IP change.
The thing I learned today was how to deploy this to a Kubernetes cluster. I learned that secrets can be presented as environment variables and or mounted as files in a volume inside your container. Although I’d prefer to use mounted files, I opted to use environment variables with this application as I know how to access them.
This is an example of how you define secrets for Kubernetes. I can then reference these from within Pod specifications to map them into containers.
The screenshot below shows this deployed on a Raspberry Pi Kubernetes cluster. Hopefully next time my broadband connection changes IP address, I should see my domain name update to reflect the change.
Apologies to anyone who joined the co-working hangout, I had to keep turning off the screen-sharing when working with secrets files.
Update: I’ve just restarted my broadband router and the update took a couple of minutes to come through. This is exactly what I need and I can now decommission all the 3rd party dynamic DNS services I had been trying to use.