add pihole

This commit is contained in:
TapTap committed 2026-10-20 16:22:39 +02:00
1 parent 4753f2ca04
commit a95c777bc6
6 files changed
+113

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: pihole-configmap
namespace: pihole
data:
TZ: Europe/Berlin
FTLCONF_dns_upstreams: "8.8.8.8;8.8.4.4"
FTLCONF_webserver_api_password: TODO
+42
View File
@@ -0,0 +1,42 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: pihole-deployment
namespace: pihole
labels:
app: pihole
spec:
replicas: 1
selector:
matchLabels:
app: pihole
template:
metadata:
labels:
app: pihole
spec:
containers:
- name: pihole
image: pihole/pihole:2025.07.1
ports:
- containerPort: 80
protocol: TCP
- containerPort: 53
protocol: UDP
- containerPort: 53
protocol: TCP
envFrom:
- configMapRef:
name: pihole-configmap
volumeMounts:
- name: pihole-volume
mountPath: /etc/pihole
- name: dnsmasq-volume
mountPath: /etc/dnsmasq.d
volumes:
- name: pihole-volume
hostPath:
path: /root/kubernetes/pihole/data/pihole
- name: dnsmasq-volume
hostPath:
path: /root/kubernetes/pihole/data/dnsmasq.d
+17
View File
@@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pihole-ingress
spec:
ingressClassName: "traefik"
rules:
- host: pihole.tap-tap.win
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: pihole-service
port:
number: 80
+9
View File
@@ -0,0 +1,9 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: pihole
resources:
- namespace.yaml
- config-map.yaml
- deployment.yaml
- service.yaml
- ingress.yaml
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: pihole
+32
View File
@@ -0,0 +1,32 @@
apiVersion: v1
kind: Service
metadata:
name: pihole-dns-service
namespace: pihole
spec:
selector:
app: pihole
type: NodePort
ports:
- name: dns-udp
protocol: UDP
port: 53
nodePort: 30053
- name: dns-tcp
protocol: TCP
port: 53
nodePort: 30053
---
apiVersion: v1
kind: Service
metadata:
name: pihole-http-service
namespace: pihole
spec:
selector:
app: pihole
ports:
- name: http
protocol: TCP
port: 80
targetPort: 80