pihole
by SavePointSam
A Helm chart to deploy pi-hole on Kubernetes
About this chart
Pi-hole
Pi-holeĀ® is a DNS sinkhole that protects your devices from unwanted content without installing any client-side software.
TL;DR
$ helm repo add savepointsam https://savepointsam.github.io/charts
$ helm install my-release savepointsam/pihole
Introduction
This chart bootstraps a Pi-hole deployment on a Kubernetes cluster using the Helm package manager.
Prerequisites
- Kubernetes 1.20+
- Helm 3.2.0+
Installing the Chart
To install the chart with the release name my-release:
helm install my-release savepointsam/pihole
The command deploys unbound on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release deployment:
helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.storageClass | Global StorageClass for Persistent Volume(s) | "" |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Override Kubernetes version | "" |
nameOverride | String to partially override common.names.name | "" |
fullnameOverride | String to fully override common.names.fullname | "" |
namespaceOverride | String to fully override common.names.namespace | "" |
commonLabels | Labels to add to all deployed objects | {} |
commonAnnotations | Annotations to add to all deployed objects | {} |
clusterDomain | Kubernetes cluster domain name | cluster.local |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
Pi-hole parameters
| Name | Description | Value |
|---|---|---|
pihole.timezone | Timezone for log rotation calculation | America/Los_Angeles |
pihole.upstream | List of upstream DNS servers | ["8.8.8.8","8.8.4.4"] |
pihole.dnssec.enabled | Enable DNSSEC | false |
pihole.privateRangeForwarding.enabled | Enable forwarding of reverse lookup for private ranges | false |
pihole.requireFqdn | Only forward Full Qualified Domain Names | true |
pihole.virtualHost | Hostname/IP for admin web UI access in addition to default "pi.hole/admin" | "" |
pihole.ipv6Support | Retain/Remove IPv6 configuration | true |
pihole.temperatureUnit | Preferred temperature unit ("c", "f", or "k") | f |
pihole.reverseServer.enabled | Enable rev-server | false |
pihole.reverseServer.domain | Domain of local network router | "" |
pihole.reverseServer.target | IP address of local network router | "" |
pihole.reverseServer.cidr | Reverse DNS zone | "" |
pihole.webui.admin.email | Default admin email for web UI | "" |
pihole.webui.admin.password | Default admin password for web UI | "" |
pihole.webui.boxedLayout | Enable boxed layout in web UI | true |
pihole.webui.queryLogging | Enable query logging | true |
pihole.webui.theme | Set web UI theme ("default-dark", "default-darker", "default-light", "default-auto", "lcars") | default-auto |
Pi-hole advanced parameters
| Name | Description | Value |
|---|---|---|
pihole.advanced.webPort | This will break the 'webpage blocked' functionality of Pi-hole however it may help advanced setups. This guide explains how to restore webpage blocked functionality using a linux router DNAT rule: https://discourse.pi-hole.net/t/alternative-synology-installation-method/5454?u=diginc | "" |
| pihole.advanced.webBindAddress | Lighttpd's bind address. If left unset lighttpd will bind to every interface, except when running in host networking mode where it will use FTLCONF_LOCAL_IPV4 instead. | "" |
| pihole.advanced.skipGravityOnBoot | Use this option to skip updating the Gravity Database when booting up the container | false |
| pihole.advanced.corsHosts | List of domains/subdomains on which CORS is allowed. Wildcards are not supported | [] |
| pihole.advanced.customCacheSize | Set the cache size for dnsmasq. When pihole.dnssec.enabled is "true", then this setting is ignored | 10000 |
| pihole.advanced.ftlCmd | Customize the options with which pihole-ftl starts | no-daemon |
| pihole.advanced.ftlConf | Customize pihole-FTL.conf with settings described here: https://docs.pi-hole.net/ftldns/configfile/ | {} |
Pi-hole experimental parameters
| Name | Description | Value |
|---|---|---|
pihole.experimental.dnsmasqUser | Allows changing the user that FTLDNS runs as | "" |
pihole.experimental.piholeUid | Overrides image's default pihole user id to match a host user id | "" |
pihole.experimental.piholeGid | Overrides image's default pihole group id to match a host group id | "" |
pihole.experimental.webUid | Overrides image's default www-data user id to match a host user id | "" |
pihole.experimental.webGid | Overrides image's default www-data group id to match a host group id | "" |
pihole.experimental.weblogsStdout | "true" logs to defined files, "false" redirect access and error logs to stdout | false |
Pi-hole deployment parameters
| Name | Description | Value |
|---|---|---|
pihole.image.registry | Pi-hole image registry | docker.io |
pihole.image.repository | Pi-hole image repository | pihole/pihole |
pihole.image.tag | Pi-hole image tag (immutable tags are recommended) | 2022.05 |
pihole.image.pullPolicy | Pi-hole image pull policy | IfNotPresent |
pihole.image.pullSecrets | Pi-hole image pull secrets | [] |
pihole.image.debug | Enable Pi-hole image debug mode | false |
pihole.replicaCount | Number of Pi-hole replicas to deploy | 1 |
pihole.containerPorts.dns | Pi-hole DNS container port | 53 |
pihole.containerPorts.http | Pi-hole HTTP container port | 80 |
pihole.containerPorts.dhcp | Pi-hole DHCP container port | 67 |
pihole.containerPorts.dhcpv6 | Pi-hole DHCPv6 container port | 547 |
pihole.livenessProbe.enabled | Enable livenessProbe on Pi-hole containers | true |
pihole.livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 60 |
pihole.livenessProbe.periodSeconds | Period seconds for livenessProbe | 10 |
pihole.livenessProbe.timeoutSeconds |
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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartpihole is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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