aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/pihole/pihole-deployment.yaml
blob: 8f4831930365edaa7afb36e7c959641b1ab999bd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
apiVersion: apps/v1
kind: Deployment
metadata:
  name: pihole
  labels:
    app: pihole
spec:
  replicas: 1
  selector:
    matchLabels:
      app: pihole
  template:
    metadata:
      labels:
        app: pihole
    spec:
      containers:
      - name: pihole
        image: pihole/pihole
        ports:
        - containerPort: 53
        - containerPort: 67
        - containerPort: 80
        - containerPort: 443
        env:
        - name: TZ
          valueFrom:
            configMapKeyRef:
              name: pihole-configmap
              key: pihole_tz
        - name: WEBPASSWORD
          valueFrom:
            secretKeyRef:
              name: pihole-secret
              key: pihole-webpassword
---
apiVersion: v1
kind: Service
metadata:
  name: pihole-service
spec:
  selector:
    app: pihole
  type: NodePort
  ports:
    - protocol: TCP
      port: 2053
      targetPort: 53
      nodePort: 30153
      name: "pihole-tcp-53"
    - protocol: UDP
      port: 2053
      targetPort: 53
      nodePort: 30153
      name: "pihole-udp-53"
    - protocol: UDP
      port: 2067
      targetPort: 67
      nodePort: 30167
      name: "pihole-udp-67"
    - protocol: TCP
      port: 2080
      targetPort: 80
      nodePort: 30180
      name: "pihole-tcp-80"
    - protocol: TCP
      port: 20443
      targetPort: 443
      nodePort: 30443
      name: "pihole-tcp-443"