mirror of
https://github.com/JamesTurland/JimsGarage.git
synced 2024-11-21 23:40:19 +00:00
Create PiHole-Deployment.yaml
This commit is contained in:
parent
d644bc2d20
commit
832008f504
1 changed files with 114 additions and 0 deletions
114
Kubernetes/Traefik-PiHole/Manifest/PiHole/PiHole-Deployment.yaml
Normal file
114
Kubernetes/Traefik-PiHole/Manifest/PiHole/PiHole-Deployment.yaml
Normal file
|
@ -0,0 +1,114 @@
|
|||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: pihole
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
app.kubernetes.io/instance: pihole
|
||||
name: pihole
|
||||
namespace: pihole
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pihole
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
spec:
|
||||
nodeSelector:
|
||||
worker: "true"
|
||||
containers:
|
||||
- image: visibilityspots/cloudflared
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: cloudflared
|
||||
ports:
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: TCP
|
||||
- containerPort: 67
|
||||
name: dns-udp
|
||||
protocol: UDP
|
||||
env:
|
||||
- name: TUNNEL_METRICS
|
||||
value: 127.0.0.1:3000
|
||||
- env:
|
||||
- name: TZ
|
||||
value: "Europe/London"
|
||||
- name: WEBPASSWORD
|
||||
value: password # change this!
|
||||
- name: FTLCONF_REPLY_ADDR4
|
||||
value: pihole
|
||||
- name: PIHOLE_DNS_
|
||||
value: 127.0.0.1#5054
|
||||
image: pihole/pihole:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: pihole
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: pihole-http
|
||||
protocol: TCP
|
||||
- containerPort: 53
|
||||
name: dns
|
||||
protocol: TCP
|
||||
- containerPort: 53
|
||||
name: dns-udp
|
||||
protocol: UDP
|
||||
- containerPort: 443
|
||||
name: pihole-ssl
|
||||
protocol: TCP
|
||||
- containerPort: 67
|
||||
name: client-udp
|
||||
protocol: UDP
|
||||
volumeMounts:
|
||||
- mountPath: /etc/pihole
|
||||
name: pihole
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
restartPolicy: Always
|
||||
volumes:
|
||||
- name: pihole
|
||||
persistentVolumeClaim:
|
||||
claimName: pihole
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
name: pihole
|
||||
namespace: pihole
|
||||
spec:
|
||||
ports:
|
||||
- name: dns-udp
|
||||
port: 53
|
||||
protocol: UDP
|
||||
targetPort: 53
|
||||
- name: client-udp
|
||||
port: 67
|
||||
protocol: UDP
|
||||
targetPort: 67
|
||||
- name: pihole-http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 80
|
||||
- name: pihole-https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: 443
|
||||
- name: dns
|
||||
port: 53
|
||||
protocol: TCP
|
||||
targetPort: 53
|
||||
selector:
|
||||
app: pihole
|
||||
externalTrafficPolicy: Local
|
||||
loadBalancerIP: 192.168.3.67 # this is your DNS IP, NOT THE GUI!
|
||||
type: LoadBalancer
|
Loading…
Reference in a new issue