codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Follow publication

Set up a free Dynamic DNS service with ddclient on Kubernetes

Joyce Lin
codeburst
Published in
9 min readMay 12, 2020

Photo by NASA on Unsplash

What is Dynamic DNS?

Don’t gamble on accessing your self-hosted services when you’re away from home

How can we run a dynamic DNS service?

DDNS client apps like ddclient periodically check your public IP for changes

Why use Kubernetes in addition to Docker?

Docker for packaging software, and Kubernetes for deploying it

Where can I deploy a Kubernetes cluster?

A recipe for deploying ddclient on Kubernetes with KubeSail

automatically update IP using ddclient

0 | Pre-requisites

KubeSail

DNS server

Kubernetes

1 | Add a cluster to the Raspberry Pi

$ sudo microk8s.kubectl apply -f https://byoc.kubesail.com/<your-kubesail-username>.yaml
The Raspberry Pi is now a single-node Kubernetes cluster!
Add a new namespace, or use the default

2 | Fork a public template

fork the ddclient template

3 | Update your DNS secrets

add an A record for the home network
Update your Cloudflare credentials in the `Secret` document

4 | Update the deployment details (skip)

The YAML explained

Review the deployment details

5 | Deploy on Kubernetes

deploy to the `default` namespace on the `Raspberry Pi` cluster

Verify ddclient is working

Final thoughts on deploying on Kubernetes

I don’t always deploy on kubernetes, but when i do, it’s a real cluster

Kubernetes for simplifying deployments

Share your templates

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in codeburst

Bursts of code to power through your day. Web Development articles, tutorials, and news.

Responses (1)

Write a response