Kube Pihole Save

Project README

Kube PiHole

A lean configuration for running Pi Hole in a local Kubernetes cluster. Ideal for homelabs. Inspired by docker pi-hole

Installation

We assume a running K8s/K3s cluster.

  1. Create volumes to be used by the pi-hole deployment :
for $v in vol1 vol2; do
  mkdir -p /mnt/disks/$v
  sudo mount -t tmpfs $v /mnt/disks/$v
done
  1. Create the admin password for pi-hole, base64 encode it and it to ./pi-hole/k3s/secret.yaml
  2. Apply the pi-hole YAMLs : kubectl apply -f ./pi-hole/k3s/

The repository comes with manifests to set up ingress-nginx services to access the pi-hole admin interface and forward the DNS queries to the pi-hole service.

  1. Install the helm chart with overrides : helm upgrade --install --create-namespace --namespace ingress-nginx --repo https://kubernetes.github.io/ingress-nginx ingress-nginx ingress-nginx -f ./ingress-ngnx/helm/values/overrides.yaml
  2. Apply the YAMLs for the udp service and load balancer : k apply -f ./ingress-nginx/k3s/
  3. Disable systemd-resolve service to stop it from listening on port 53 : systemctl disable systemd-resolve
  4. Set IP of one of your nodes as your DNS server.

Notes

  • We create a separate load balancer for the UDP protocol because the service type LoadBalancer does not support a multi protocol setup. though the support is in the pipeline.
  • The UDP service is not exposed using helm chart values because doing so forces helm to add the service to the TCP load balancer leading to a failure due to the reason mentioned above.

TO DO

  • IPv6 support
Open Source Agenda is not affiliated with "Kube Pihole" Project. README Source: manibatra/kube-pihole
Stars
56
Open Issues
0
Last Commit
1 year ago

Open Source Agenda Badge

Open Source Agenda Rating