If you're running a Kubernetes cluster and want Pi-hole as your network-wide DNS ad blocker, here's a step-by-step guide using a community Helm chart from [HelmForge]( GitHub - helmforgedev/charts: Production-ready Helm charts with built-in S3 backup for Kubernetes · GitHub ).
Quick Install
Add the repository and install with defaults:
helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install pihole helmforge/pihole
Or install directly from the OCI registry:
helm install pihole oci://ghcr.io/helmforgedev/helm/pihole
This gives you Pi-hole running with:
-
Persistent storage for `/etc/pihole` (1Gi)
-
DNS service on port 53 via LoadBalancer
-
Google DNS (8.8.8.8 / 8.8.4.4) as upstream
-
Web admin UI on port 80
Enabling Unbound for recursive DNS
If you want full DNS privacy without relying on Google, Cloudflare, or any upstream resolver, enable the Unbound sidecar. It performs recursive DNS resolution directly from root nameservers.
# values.yaml
unbound:
enabled: true
When Unbound is enabled, Pi-hole automatically switches its upstream DNS to 127.0.0.1#5335 (the Unbound sidecar). No manual DNS configuration needed.
Custom DNS records
Manage local DNS entries directly from your Helm values — no need to manually edit Pi-hole's admin UI:
# values.yaml
dns:
customRecords:
- "192.168.1.10 nas.local"
- "192.168.1.20 printer.local"
- "192.168.1.30 homeassistant.local"
cnameRecords:
- "cname=media.local,nas.local"
Monitoring with Prometheus
Enable the pihole-exporter sidecar for Prometheus metrics and Grafana dashboards:
# values.yaml
metrics:
enabled: true
serviceMonitor:
enabled: true
interval: 30s
This exposes Pi-hole stats (queries, blocked domains, cache hits) on port 9617.
Exposing the admin UI with Ingress
# values.yaml
ingress:
enabled: true
ingressClassName: nginx # or traefik, or your ingress class
hosts:
- host: pihole.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: pihole-tls
hosts:
- pihole.example.com
Full production example
Here's a complete values.yaml for a production setup with Unbound, fixed DNS IP, monitoring, custom records, and ingress:
pihole:
timezone: America/Sao_Paulo
dnssec: true
admin:
password: "your-secure-password"
dns:
customRecords:
- "192.168.1.10 nas.local"
- "192.168.1.20 printer.local"
serviceDns:
type: LoadBalancer
loadBalancerIP: "192.168.1.53"
externalTrafficPolicy: Local
ingress:
enabled: true
ingressClassName: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: pihole.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: pihole-tls
hosts:
- pihole.example.com
persistence:
enabled: true
size: 2Gi
unbound:
enabled: true
metrics:
enabled: true
serviceMonitor:
enabled: true
Install with your custom values:
helm install pihole helmforge/pihole -f values.yaml
Links
-
Chart source: charts/charts/pihole at main · helmforgedev/charts · GitHub
-
ArtifactHub: pihole 1.3.5 · helmforge/helmforge
-
Documentation: https://helmforge.dev/docs/charts/pihole
-
All HelmForge charts: https://helmforge.dev
This is an open-source community chart (MIT license), not affiliated with the Pi-hole project. Feedback and contributions are welcome!