Pihole on K3S reddit / selfhosted ---------------------------------------------------------------------- HNGLT · 2023-12-06 23:41 I have successfully setup Pihole on K3S behind an nginx ingress. My problem is that I have no clue which IP to use for the DNS server on my router. I feel like I've tried all the options (main machine IP, pihole clusterIP, and the random IPs in the pihole web UI.) I'm beginning to think it's not possible so any insight would be greatly appreciated. ---------------------------------------------------------------------- clintkev251 · 2023-12-07 00:17 Presumably your nginx ingress is only exposing the web interface of the pihole. You should use a load balancer to expose the service on it's own IP so that the actual DNS resolver itself is reachable on port 53 as expected ---------------------------------------------------------------------- HNGLT · 2023-12-07 00:26 I will try that, thank you! ---------------------------------------------------------------------- Narrow_Letterhead_96 · 2023-12-07 20:44 You're probably aware of it but DNS use the TCP/UDP protocol. And the "pure" K8s ingress specification are only intended for HTTP traffic. Nginx does support those protocols via ingress despite this but the configuration is more involved. So as others said it makes sense to use a load balancer to expose the service instead. In my local setup I'm using Metallb https://metallb.org/ to announce different IP addresses for my ingress and other load balanced services to avoid potential clashes with ports. But it's not necessary ---------------------------------------------------------------------- kboda · 2023-12-08 14:49 You have two options: 1. Deploy Pihole with hostNetwork: true (no Ingress / LB needed) 2. Configure your ingress / reverse proxy solution to include port 53 In both cases: - The router will need to use the IP address of your main machine. - Disable resolved running on your main machine (outside k3s), so k3s can bind port 53.