Skip to content

Instantly share code, notes, and snippets.

@dalethestirling
Created April 17, 2022 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalethestirling/ad5af29ada166489867d1cd2555b7f19 to your computer and use it in GitHub Desktop.
Save dalethestirling/ad5af29ada166489867d1cd2555b7f19 to your computer and use it in GitHub Desktop.
Deploy pi-hole-docker as a Pod in Kubernetes
apiVersion: v1
kind: Pod
metadata:
name: pihole
labels:
app: pihole
spec:
hostNetwork: true
containers:
- name: pihole
image: pihole/pihole:2021.10
imagePullPolicy: IfNotPresent
env:
- name: TZ
value: "Australia/Brisbane"
securityContext:
privileged: true
ports:
- containerPort: 53
protocol: TCP
- containerPort: 53
protocol: UDP
- containerPort: 67
protocol: UDP
- containerPort: 80
hostPort: 80
protocol: TCP
- containerPort: 443
hostPort: 443
protocol: TCP
volumeMounts:
- name: etc
mountPath: /etc/pihole
- name: dnsmasq
mountPath: /etc/dnsmasq.d
resources:
requests:
memory: 128Mi
cpu: 100m
limits:
memory: 2Gi
cpu: 1
volumes:
- name: etc
hostPath:
path: /opt/volumes/pi-hole/etc
- name: dnsmasq
hostPath:
path: /opt/volumes/pi-hole/dnsmasq.d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment