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:
# 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
Or if installing from the repository:
# 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 as microk8s helm and microk8s kubectl
# On your Pi
RELEASE=pihole
NAMESPACE=pihole-n
helm install