While there are browser extensions and apps you can use to block ads on your desktop and mobile, they require installing them individually on each of your devices. And that's assuming there's an app available for the device and OS in question.
Wouldn't it be better to also block ads at the router level? All those smart TVs, set-top boxes, game consoles, VR headsets, smart speakers, smart thermostats, robot vacuums, security cameras, doorbells, and other IoT devices love chatting with metrics/ad services. Let's put a stop to that by deploying a DNS server that will block requests to known ad servers.
Raspberry Pi is a tiny computer you can use as a desktop, smart home hub, robot brains, media center, and more. If you have been thinking about setting up a homelab, a Raspberry Pi is a great place to start at an extremely low cost. They are in high demand but this site can help you find one.
MicroK8s is a lightweight distribution of Kubernetes (K8s) for container orchestration. We'll also use Helm, a package manager for K8s, for easy deployment.
Pi-hole is a DNS sinkhole that protects your devices from unwanted content, without installing any client-side software. It's installed in one place and blocks ads for your entire home network.
When you're done you'll have an admin interface for all your K8s workloads:
And another for your Pi-hole stats:
Let's get started! All the details are here:
santisbon / pi-hole-k8s
Deploy Pi-hole to a Kubernetes cluster on a Raspberry Pi.
Network-wide ad blocking with Pi-hole, Kubernetes, and Raspberry Pi
Prerequisites
- Set up your Raspberry Pi with a static IP.
- Install and configure MicroK8s (or any other lightweight Kubernetes distribution) on your Pi.
Install
- Prepare your Pi's storage
# On your Pi sudo mkdir -p /etc/pihole sudo mkdir -p /etc/dnsmasq.d
- If installing from source, grab the code
# On your Pi CHART="./piholechart" git clone https://github.com/santisbon/pi-hole-k8s.git && cd pi-hole-k8s nano $CHART/values.yaml # edit the values
# On your Pi helm repo add santisbon https://santisbon.github.io/charts/ CHART="santisbon/pihole"
- Install the Helm chart which will enforce the installation order. Replace parameters with a secure password and the static IP of your Pi if you didn't do it through the
values.yaml
file. If using MicroK8s type the commands asmicrok8s helm
andmicrok8s kubectl
# On your Pi RELEASE=pihole NAMESPACE=pihole-n helm install
…
Top comments (0)