pihole

by HelmForge

Helm chartv2.2.3App 2026.11.0Apache-2.0Verified publisher

A Helm chart for deploying Pi-hole DNS sinkhole on Kubernetes

About this chart

Pi-hole DNS Sinkhole

A Helm chart for deploying Pi-hole on Kubernetes using the official pihole/pihole container image.

Installation

HTTPS Repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install pihole helmforge/pihole

OCI Registry

helm install pihole oci://ghcr.io/helmforgedev/helm/pihole

Quick Start

helm install pihole oci://ghcr.io/helmforgedev/helm/pihole \
  --set admin.password=changeme \
  --set serviceDns.loadBalancerIP=192.168.1.53

Features

  • Network-Wide Ad Blocking — DNS-level filtering for all devices on the network
  • Custom DNS Records — Local A records, CNAME records, and dnsmasq configuration
  • Unbound Sidecar — Optional recursive DNS resolver eliminating third-party DNS dependency
  • Pi-hole v6+ Support — Uses FTLCONF_ environment variables for modern configuration
  • Prometheus Metrics — pihole-exporter sidecar with ServiceMonitor support
  • Ingress Support — Configurable ingress with TLS for the web admin interface
  • DHCP Support — Optional DHCP server with hostNetwork mode
  • DNSSEC Validation — Optional DNS Security Extensions
  • Configurable Listeners — DNS and web ports configure Pi-hole FTL itself
  • Immutable Images — All workload and backup images are pinned by digest
  • Ingress Policy — NetworkPolicy limits inbound traffic to declared ports

Security Scan: pihole

Every PR runs Kubescape against the rendered default manifests using the MITRE, NSA, and SOC2 frameworks. The authoritative score is posted on the PR. The chart drops all capabilities before adding only the official image's required runtime set, disables privilege escalation and API token mounting, uses runtime-default seccomp, pins images by digest, and creates an ingress NetworkPolicy. Root bootstrap and writable Pi-hole configuration remain documented upstream constraints.

FrameworkScore
MITRE + NSA + SOC290.90909%

Configuration

Minimal (Simple Setup)

admin:
  password: "change-me"

serviceDns:
  type: LoadBalancer
  loadBalancerIP: "192.168.1.53"

Production (Full Setup)

pihole:
  timezone: America/Sao_Paulo
  dnssec: true

admin:
  existingSecret: pihole-admin
  existingSecretKey: password

unbound:
  enabled: true
  resources:
    requests:
      cpu: 50m
      memory: 64Mi
    limits:
      cpu: 200m
      memory: 128Mi

dns:
  customRecords:
    - "192.168.1.1 router.home"
    - "192.168.1.10 nas.home"
  cnameRecords:
    - "cname=media.home,nas.home"

persistence:
  enabled: true
  size: 2Gi

resources:
  requests:
    cpu: 100m
    memory: 128Mi
  limits:
    cpu: 500m
    memory: 512Mi

serviceDns:
  type: LoadBalancer
  loadBalancerIP: "192.168.1.53"
  externalTrafficPolicy: Local

ingress:
  enabled: true
  ingressClassName: traefik
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - host: pihole.home
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: pihole-tls
      hosts:
        - pihole.home

metrics:
  enabled: true
  serviceMonitor:
    enabled: true
    labels:
      release: prometheus

Parameters

Pi-hole

KeyDefaultDescription
image.repositorydocker.io/pihole/piholePi-hole container image repository
image.tag2026.11.0Pi-hole container image tag (official upstream release 2026.11.0)
image.digestpinned SHA-256Immutable Pi-hole image digest
image.pullPolicyIfNotPresentPi-hole image pull policy
containerPorts.dns53Pi-hole FTL DNS listener port (TCP and UDP)
containerPorts.http80Primary Pi-hole FTL HTTP listener used by the Service, probes, and metrics
pihole.timezoneUTCTimezone for logs and scheduled tasks
pihole.upstreamDns8.8.8.8;8.8.4.4Upstream DNS servers (semicolon-delimited)
pihole.listeningModeALLDNS listening mode (LOCAL, ALL, SINGLE, BIND)
pihole.webserverPort""Full FTL webserver.port value; empty derives from containerPorts.http
pihole.dnssecfalseEnable DNSSEC validation
pihole.ftl.rateLimit1000Rate limiting query count per client; set to 0 to disable
pihole.ftl.rateLimitInterval60Rate limiting interval in seconds
pihole.extraEnv[]Additional environment variables

Image tags and digests form a pair. When overriding any image tag, also set the matching digest to the digest published for that exact tag; Kubernetes resolves the digest as the deployed image identity.

Admin

KeyDefaultDescription
admin.password""Web admin password (auto-generated if empty)
admin.existingSecret""Existing secret for admin password
admin.existingSecretKeypasswordKey in existing secret

DNS Records

KeyDefaultDescription
dns.customRecords[]Custom local DNS A records ("IP HOSTNAME")
dns.cnameRecords[]Custom CNAME records (dnsmasq format)
dns.customDnsmasq[]Custom dnsmasq configuration lines
dns.adlists[]Blocklist URLs for gravity database
dns.whitelist[]Whitelisted domains
dns.blacklist[]Blacklisted domains
dns.regex[]Regex filters for blocking

Gravity

KeyDefaultDescription
gravity.enabledtrueReconcile Pi-hole gravity schema and Helm-managed lists before Pi-hole starts
gravity.updateOnInittrueRun pihole -g in a follow-up init container after Helm-managed lists are reconciled
gravity.resourcesrequests 50m/64Mi, limits 200m/128MiResources for the gravity schema/list init container
gravity.updateResourcesrequests 100m/128Mi, limits 500m/512MiResources for the gravity update init container

Persistence

KeyDefaultDescription
persistence.enabledtrueEnable persistent storage
persistence.storageClass""Storage class
persistence.accessModeReadWriteOncePVC access mode
persistence.size1GiPVC size
persistence.existingClaim""Use existing PVC

Services

KeyDefaultDescription
hostNetworkfalseUse host network for the main Pi-hole pod
dnsPolicy""Pod DNS policy; defaults to ClusterFirstWithHostNet when host networking is enabled
serviceDns.typeLoadBalancerDNS service type
serviceDns.port53DNS port
serviceDns.loadBalancerIP—Fixed IP for DNS stability
serviceDns.externalTrafficPolicy—External traffic policy
serviceWeb.typeClusterIPWeb admin service type
serviceWeb.port80Web admin port

serviceDns.port and serviceWeb.port are client-facing Service ports. containerPorts.dns changes the Pi-hole FTL DNS listener. containerPorts.http is the primary unencrypted web listener targeted by the Web Service, HTTP probes, and metrics exporter. For multiple IPv4, IPv6, HTTP, or HTTPS listeners, set pihole.webserverPort to the complete FTL value and include containerPorts.http as a directly served HTTP listener bound to all pod interfaces. Do not add r or s to that primary listener or bind it to a specific address; Service probes and the metrics exporter require direct HTTP. Redirect, TLS, and address-specific listeners may be added separately. For example:

containerPorts:
  http: 9090
pihole:
  webserverPort: "9090o,[::]:9090o,9091os,[::]:9091os"

The chart Web Service and default NetworkPolicy expose only containerPorts.http; additional FTL listeners such as HTTPS 9091 are not routed through that Service. With hostNetwork, reach them directly through the node and enforce access with the node firewall. For ordinary pod networking, terminate TLS at an Ingress or Gateway that targets the primary HTTP listener.

DHCP remains on protocol-defined UDP port 67.

Security and Resources

KeyDefaultDescription
resourcesrequests 100m/128Mi, limits 500m/512MiCPU and memory resources for the Pi-hole container
podSecurityContext.seccompProfile.typeRuntimeDefaultEnables the Kubernetes default seccomp profile
securityContext.allowPrivilegeEscalationfalsePrevents privilege escalation while preserving required Pi-hole capabilities
securityContext.capabilities.addimage runtime setCapabilities required for image setup, privilege drop, FTL file capabilities, DNS binding, and shutdown
serviceAccount.automountServiceAccountTokenfalseKeeps Kubernetes API tokens out of the pod unless explicitly needed
networkPolicy.enabledtrueRestrict ingress to declared Pi-hole pod ports
networkPolicy.ingressFrom[]Optional source peers; empty allows LAN and cluster clients

NetworkPolicy enforcement for dhcp.hostNetwork: true depends on the cluster network plugin. Verify host-network policy behavior and use node-level controls when the Pi-hole listeners must be restricted.

Ingress

KeyDefaultDescription
ingress.enabledfalseEnable ingress
ingress.ingressClassName""Ingress class (traefik, nginx, etc.)
ingress.hosts[]Ingress hosts and paths
ingress.tls[]TLS configuration

Metrics

KeyDefaultDescription
metrics.enabledfalseEnable pihole-exporter sidecar
metrics.image.tagv1.2.0pihole-exporter version
metrics.port9617Metrics port
metrics.resourcesrequests 25m/64Mi, limits 100m/128MiResources for the pihole-exporter sidecar
metrics.serviceMonitor.enabledfalseCreate ServiceMonitor
metrics.serviceMonitor.interval30sScrape interval

Backup

KeyDefaultDescription
backup.enabledfalseEnable scheduled S3-compatible backups
backup.schedule0 3 * * *Backup CronJob schedule
backup.include.gravitytrueInclude the gravity database
backup.include.customDnstrueInclude custom DNS records
backup.include.dnsmasqtrueInclude dnsmasq configuration
backup.resourcesrequests 50m/64Mi, limits 250m/256MiResources for backup and upload containers
backup.s3.endpoint""S3-compatible endpoint URL
backup.s3.bucket""Target bucket name
backup.s3.existingSecret""Existing Secret with access-key and secret-key

Unbound

KeyDefaultDescription
unbound.enabledfalseEnable Unbound sidecar
unbound.image.tag1.22.0Unbound version
unbound.port5335Unbound listening port
unbound.resourcesrequests 50m/64Mi, limits 200m/128MiResources for Unbound

DHCP

KeyDefaultDescription
dhcp.enabledfalseEnable the Pi-hole DHCP server and expose UDP 67
dhcp.hostNetworkfalseUse host network for DHCP
dhcp.start""First IPv4 address in the lease range (required when enabled)
dhcp.end""Last IPv4 address in the lease range (required when enabled)
dhcp.router""Router address advertised to clients (required when enabled)
dhcp.leaseTime24hLease duration accepted by Pi-hole FTL

Scheduling

KeyDefaultDescription
nodeSelector{}Node selector
tolerations[]Tolerations
affinity{}Affinity rules
topologySpreadConstraints[]Topology spread
priorityClassName""Priority class
terminationGracePeriodSeconds30Shutdown grace period

Resources Generated

ResourceConditionDescription
DeploymentAlwaysPi-hole server (single replica, Recreate strategy)
Service (DNS)AlwaysDNS ports TCP/UDP 53 (LoadBalancer by default)
Service (Web)AlwaysWeb admin port 80 (ClusterIP by default)
PersistentVolumeClaimpersistence.enabledPi-hole data volume
SecretNo admin.existingSecretAdmin password
ConfigMapCustom DNS/dnsmasq configDNS records and dnsmasq config
Ingressingress.enabledWeb admin ingress
ServiceAccountserviceAccount.createDedicated SA
ServiceMonitormetrics.serviceMonitor.enabledPrometheus scrape config

Examples

  • Simple — minimal deployment with fixed DNS IP
  • Production — Unbound, ingress, metrics, custom DNS
  • Custom DNS — local DNS records and conditional forwarding

Architecture Guides

  • Design rationale — scope, security, production boundaries, and known gaps
  • Unbound Recursive DNS — privacy-focused recursive DNS resolution
  • Operations guide — backup, upgrades, runtime verification, and troubleshooting

Upgrade Notes

Upgrading to 2026.11.0

Pi-hole 2026.11.0 includes fixes for 17 published security advisories. The Docker release also prevents Secret-backed web passwords from appearing in shell traces and makes FTL and release downloads fail closed. Back up the persistent data and verify DNS, admin login, gravity updates, and any enabled Unbound or DHCP workflow after rollout.

Chart 2.2.0 changed securityContext.capabilities to drop all capabilities b

Deploy pihole with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pihole on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartpihole is pinned at v2.2.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply