Last active
          July 15, 2023 12:03 
        
      - 
      
- 
        Save dalethestirling/bc9bc22f8acb855187dec0cad17f7f58 to your computer and use it in GitHub Desktop. 
    Kubernetes deployment files for pi-hole.net
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| app: pihole | |
| name: pihole | |
| namespace: pi-hole | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: pihole | |
| template: | |
| metadata: | |
| labels: | |
| app: pihole | |
| spec: | |
| hostNetwork: true | |
| containers: | |
| - image: pihole/pihole:2023.05.2 | |
| imagePullPolicy: IfNotPresent | |
| name: pihole | |
| env: | |
| - name: TZ | |
| value: "Australia/Brisbane" | |
| - name: DNSMASQ_USER | |
| value: "root" | |
| securityContext: | |
| privileged: true | |
| capabilities: | |
| add: | |
| - NET_ADMIN | |
| - NET_BIND_SERVICE | |
| - NET_RAW | |
| - NET_ADMIN | |
| - SYS_NICE | |
| - CHOWN | |
| 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 | |
| restartPolicy: Always | |
| volumes: | |
| - name: etc | |
| hostPath: | |
| path: /opt/volumes/pi-hole/etc | |
| - name: dnsmasq | |
| hostPath: | |
| path: /opt/volumes/pi-hole/dnsmasq.d | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: pihole | |
| name: pihole-tcp | |
| namespace: pi-hole | |
| spec: | |
| ports: | |
| - port: 80 | |
| nodePort: 30480 | |
| name: port80 | |
| protocol: TCP | |
| - port: 443 | |
| nodePort: 30443 | |
| name: port443 | |
| protocol: TCP | |
| - port: 53 | |
| targetPort: 53 | |
| protocol: TCP | |
| name: port53 | |
| selector: | |
| app: pihole | |
| type: LoadBalancer | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| labels: | |
| app: pihole | |
| name: pihole-udp | |
| namespace: pi-hole | |
| spec: | |
| ports: | |
| - port: 53 | |
| nodePort: 53 | |
| protocol: UDP | |
| name: port53-udp | |
| - port: 67 | |
| targetPort: 67 | |
| protocol: UDP | |
| name: port67-udp | |
| selector: | |
| app: pihole | |
| type: LoadBalancer | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment