enable pihole
This commit is contained in:
14
clusters/default/tools/pihole/pihole-pvc.yml
Normal file
14
clusters/default/tools/pihole/pihole-pvc.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pihole-longhorn
|
||||
namespace: tools
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: longhorn
|
||||
16
clusters/default/tools/pihole/pihole-svc.yml
Normal file
16
clusters/default/tools/pihole/pihole-svc.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pihole-tcp-service
|
||||
namespace: tools
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
loadBalancerIP: 192.168.1.229
|
||||
selector:
|
||||
app: pihole
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
protocol: TCP
|
||||
name: web
|
||||
49
clusters/default/tools/pihole/pihole.yml
Normal file
49
clusters/default/tools/pihole/pihole.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pihole
|
||||
namespace: tools
|
||||
spec:
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pihole
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pihole
|
||||
spec:
|
||||
hostNetwork: true
|
||||
affinity:
|
||||
nodeAffinity:
|
||||
requiredDuringSchedulingIgnoredDuringExecution:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- kube-02
|
||||
- kube-03
|
||||
- kube-04
|
||||
- kube-05
|
||||
containers:
|
||||
- name: pihole
|
||||
image: pihole/pihole@sha256:90a1412b3d3037d1c22131402bde19180d898255b584d685c84d943cf9c14821
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
env:
|
||||
- name: TZ
|
||||
value: "Asia/Kolkata"
|
||||
- name: FTLCONF_dns_listeningMode
|
||||
value: "all"
|
||||
volumeMounts:
|
||||
- name: pihole-data
|
||||
mountPath: /etc/pihole
|
||||
volumes:
|
||||
- name: pihole-data
|
||||
persistentVolumeClaim:
|
||||
claimName: pihole-longhorn
|
||||
Reference in New Issue
Block a user